summaryrefslogtreecommitdiffstats
path: root/install/autodetect
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-05-03 04:02:53 +0200
committerAaron Griffin <aaron@archlinux.org>2006-05-03 04:02:53 +0200
commitad1050964eabbbc00547e8c6c91d8a7c3f13598f (patch)
tree79962456d502bbbb8a072568f31bd18e99b85099 /install/autodetect
parent66f28ea341f293cbddd30242f9ea03673d4674d2 (diff)
downloadmkinitcpio-ad1050964eabbbc00547e8c6c91d8a7c3f13598f.tar.gz
mkinitcpio-ad1050964eabbbc00547e8c6c91d8a7c3f13598f.tar.xz
Merged autodetect changes from tpowa.
Removed older subsystem specific scripts, replaced then with 'modload' just to keep the option in place. git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@43 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'install/autodetect')
-rw-r--r--install/autodetect36
1 files changed, 24 insertions, 12 deletions
diff --git a/install/autodetect b/install/autodetect
index 9e23783..c851a4b 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -5,21 +5,33 @@ install ()
msg ":: Autodetecting modules"
#blegh, we'll let /tmp clean itself up
modtmp=$( mktemp /tmp/initcpio_modules.XXXXXX )
- MODULES=" $(auto_modules "/scsi/" | grep -v "ata")
- $(auto_modules "/block/")
- $(auto_modules "/fusion/")
- $(auto_modules "/usb/") usb_storage usbhid
- $(auto_modules "scsi/.*ata")
- $(auto_modules "/ide/")
- $(cat /proc/filesystems | grep -v nodev) "
- for m in $MODULES; do
+ modall=$( mktemp /tmp/initcpio_modulesall.XXXXXX )
+ AUTODETECT=" $(auto_modules "/scsi/" | grep -v "imm"| grep -v "pcmcia" | grep -v "ide" && echo "sd_mod sr_mod")
+ $(auto_modules "/block/" && echo "sd_mod sr_mod")
+ $(auto_modules "/fusion/" && echo "sd_mod sr_mod")
+ $(auto_modules "/usb/" && echo "usb_storage usbhid sd_mod sr_mod")
+ $(auto_modules "/ide/")
+ $(auto_modules "/ieee1394/" && echo "sbp2 sd_mod sr_mod")
+ $(auto_modules "/cdrom/")
+ $(cat /proc/filesystems | grep -v nodev) "
+
+ for m in $AUTODETECT; do
echo $(basename ${m//\.ko/}) >> $modtmp
- [ "$m" == "ata_piix" ] && echo "piix" >> $modtmp
+ [ "$m" == "ext3" ] && echo "jbd" >> $modtmp
done
- add_file $modtmp "/modules"
-
+ grep "file /lib/modules" ${FILELIST} >>$modall
+ for i in `cat $modtmp`; do
+ sed -i -e "\=/$i=d" $modall
+ done
+ for i in `grep "file /lib/modules" $modall | awk '{print $2}'`; do
+ sed -i -e "\=$i=d" ${FILELIST}
+ done
+ msg "Included MODULES:"
+ msg "-----------------"
+ msg "$(grep "file /lib/modules/" ${FILELIST} | awk '{print $2}')"
+ msg "-----------------"
BINARIES=""
FILES=""
- SCRIPT="autodetect"
+ SCRIPT=""
}