From 7c6776156d4b9513510827feecc64bc85ff88e64 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 8 May 2006 14:57:57 +0000 Subject: mdadm formatting + style cleanup (minor) git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@84 880c04e9-e011-0410-abf7-b926e227c9cd --- install/autodetect | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'install/autodetect') 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})" -- cgit v1.2.3-24-g4f1b