diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-05-08 16:57:57 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-05-08 16:57:57 +0200 |
commit | 7c6776156d4b9513510827feecc64bc85ff88e64 (patch) | |
tree | 5755faae0744cb933ae0d6e0c113d7f44bdbdb66 /install | |
parent | de0eddc73b5e720d6e6214c38758962f38a8d4a2 (diff) | |
download | mkinitcpio-7c6776156d4b9513510827feecc64bc85ff88e64.tar.gz mkinitcpio-7c6776156d4b9513510827feecc64bc85ff88e64.tar.xz |
mdadm formatting + style cleanup (minor)
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@84 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'install')
-rw-r--r-- | install/autodetect | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/install/autodetect b/install/autodetect index ea2393a..e3543e7 100644 --- a/install/autodetect +++ b/install/autodetect @@ -7,12 +7,16 @@ install () AUTODETECT="$(auto_modules -e "/scsi/" -e "/block" -e "/fusion/" \ -e "/usb/" -e "/ide/" -e "/ieee1394/" -e "/cdrom"\ -e "/net/" -e "/pcmcia") - $(cat /proc/filesystems | grep -v nodev) \ - $([ -e /sbin/mdadm ] && mdadm -E -s /dev/hd* /dev/sd* /dev/rd/* /dev/ida/* \ - /dev/cciss/* /dev/ataraid/* | awk -Flevel= '{print $2}' | awk '{print $1}') " + $(cat /proc/filesystems | grep -v nodev) " - [ -e /sbin/mdadm ] && if ! [ $UID -eq 0 -o "$(groups | grep disk)" != "" ]; then \ - err "User does not have proper permissions to read superblocks, raid modules are not detected" ;fi + if [ -e /sbin/mdadm ]; then + if [ $UID -eq 0 -o "$(groups | grep disk)" != "" ]; 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 modules are not detected" + fi + fi for m in $AUTODETECT; do modname="$(basename ${m%%\.ko})" |