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 --- hooks/ide | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'hooks/ide') diff --git a/hooks/ide b/hooks/ide index 0a81062..a6ca17c 100644 --- a/hooks/ide +++ b/hooks/ide @@ -3,19 +3,7 @@ run_hook () { if [ -e /proc/ide ]; then msg -n "Loading ide modules..." - /bin/modprobe -q ide-generic >/dev/null 2>&1 - for d in /proc/ide/*; do - unit=${d#/proc/ide/} - if [ -e "${d}/media" -a ! -d "/sys/block/${unit}" ]; then - read m < "${d}/media" - case "${m}" in - disk) /bin/modprobe -q ide-disk >/dev/null 2>&1;; - cdrom) /bin/modprobe -q ide-cd >/dev/null 2>&1;; - tape) /bin/modprobe -q ide-tape >/dev/null 2>&1;; - floppy) /bin/modprobe -q ide-floppy >/dev/null 2>&1;; - esac - fi - done + /bin/modprobe -q -a $(/bin/cat /sys/bus/ide/devices/*/modalias) >/dev/null 2>&1 msg "done" else msg "No ide devices detected..." -- cgit v1.2.3-24-g4f1b