From 2ed876b6b5c7b431caf5c452d6ee4a67241c4d01 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 27 Apr 2006 17:08:47 +0000 Subject: Added 'autodetect' hook, intended to replace *-auto scripts Beginnings of raid and dm hooks Used sysfs for ide parsing git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@25 880c04e9-e011-0410-abf7-b926e227c9cd --- install/autodetect | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 install/autodetect (limited to 'install/autodetect') diff --git a/install/autodetect b/install/autodetect new file mode 100644 index 0000000..9e23783 --- /dev/null +++ b/install/autodetect @@ -0,0 +1,25 @@ +# vim: set ft=sh: + +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 + echo $(basename ${m//\.ko/}) >> $modtmp + [ "$m" == "ata_piix" ] && echo "piix" >> $modtmp + done + + add_file $modtmp "/modules" + + BINARIES="" + FILES="" + SCRIPT="autodetect" +} -- cgit v1.2.3-24-g4f1b