diff options
author | Thomas Bächler <thomas@archlinux.org> | 2006-10-15 20:51:34 +0200 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2006-10-15 20:51:34 +0200 |
commit | c4fbca2a3ed289d60feb46ef60cf68386c2c9331 (patch) | |
tree | 233e06f84d9f14b1083221c73010aa4862a43ac5 /install/autodetect | |
parent | d57c0f96054aeb4d310d6e5af098b3a5d72a66ff (diff) | |
download | mkinitcpio-c4fbca2a3ed289d60feb46ef60cf68386c2c9331.tar.gz mkinitcpio-c4fbca2a3ed289d60feb46ef60cf68386c2c9331.tar.xz |
fixed autodetection
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@175 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'install/autodetect')
-rw-r--r-- | install/autodetect | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/install/autodetect b/install/autodetect index 01b4f48..8b8155b 100644 --- a/install/autodetect +++ b/install/autodetect @@ -20,22 +20,22 @@ install () done } - if [ -e /sbin/mdadm ]; then - if [ $UID -eq 0 -o "$(groups | grep disk)" != "" ]; then - for fs in $(findfs | sort | uniq); do - for mod in $(find "${MODULEDIR}" -type f -name "${fs}.ko"); do - if [ "x${mod}" != "x" ]; then - AUTODETECT="${AUTODETECT} ${mod}" - fi - done + if [ $UID -eq 0 -o "$(groups | grep disk)" != "" ]; then + for fs in $(findfs | sort | uniq); do + for mod in $(find "${MODULEDIR}" -type f -name "${fs}.ko"); do + if [ "x${mod}" != "x" ]; then + AUTODETECT="${AUTODETECT} ${mod}" + fi done + done + if [ -e /sbin/mdadm ]; then AUTODETECT="$AUTODETECT $(mdadm -E -s /dev/hd* /dev/sd* /dev/rd/* /dev/ida/* /dev/cciss/* /dev/ataraid/* \ | awk -Flevel= '{print $2}' | awk '{print $1}')" - else - err "User does not have proper permissions to read superblocks, raid and filesystem modules are not detected" fi + else + err "User does not have proper permissions to read superblocks, raid and filesystem modules are not detected" fi for m in $AUTODETECT; do |