From ad1050964eabbbc00547e8c6c91d8a7c3f13598f Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 3 May 2006 02:02:53 +0000 Subject: 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 --- install/autodetect | 36 ++++++++++++++++++++++++------------ install/filesystems-auto | 17 ----------------- install/ide | 2 +- install/modload | 18 ++++++++++++++++++ install/pci | 17 ----------------- install/sata | 2 +- install/scsi | 2 +- install/udev | 3 ++- 8 files changed, 47 insertions(+), 50 deletions(-) delete mode 100644 install/filesystems-auto create mode 100644 install/modload delete mode 100644 install/pci (limited to 'install') 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="" } diff --git a/install/filesystems-auto b/install/filesystems-auto deleted file mode 100644 index bf7976c..0000000 --- a/install/filesystems-auto +++ /dev/null @@ -1,17 +0,0 @@ -# vim: set ft=sh: - -install () -{ - MODULES=" $(cat /proc/filesystems | grep -v nodev) " - BINARIES="" - FILES="" - SCRIPT="filesystems" -} - -help () -{ -cat<