diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-12-31 22:45:09 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-01-05 01:08:46 +0100 |
commit | 3602a8e80cc1866f2d4215a95d5627163654b2dc (patch) | |
tree | 589d29dfcba69ee7b3311487818694c36d6379af /install/autodetect | |
parent | f8d1749dd9a63befc9fd46198c76a63a2f4b349e (diff) | |
download | mkinitcpio-3602a8e80cc1866f2d4215a95d5627163654b2dc.tar.gz mkinitcpio-3602a8e80cc1866f2d4215a95d5627163654b2dc.tar.xz |
mkinitcpio: remove hardcoded paths
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'install/autodetect')
-rw-r--r-- | install/autodetect | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/install/autodetect b/install/autodetect index 5537f7c..c787fcb 100644 --- a/install/autodetect +++ b/install/autodetect @@ -16,8 +16,8 @@ build() { fi if (( UID == 0 )) || in_array 'disk' $(groups); then - if [[ -x /sbin/mdadm ]]; then - /sbin/mdadm -Esv /dev/[hrsv]d* /dev/{ida,cciss,ataraid,mapper}/* | + if [[ -x $(type -P mdadm) ]]; then + mdadm -Esv /dev/[hrsv]d* /dev/{ida,cciss,ataraid,mapper}/* | sed -n 's/.*level=\([^ ]\+\) .*/\1/p' | sed 's/\<raid[456]\>/raid456/g' | sort -u >>"$MODULE_FILE" fi |