[arch-projects] [mkinitcpio][PATCH 4/8] mkinitcpio: remove hardcoded paths

Dave Reisner d at falconindy.com
Thu Jan 5 14:26:10 EST 2012


Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
 install/autodetect |    4 ++--
 mkinitcpio         |    2 +-
 2 files changed, 3 insertions(+), 3 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
diff --git a/mkinitcpio b/mkinitcpio
index b6581ed..bcf56e9 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -353,7 +353,7 @@ if (( ${#ADDED_MODULES[*]} )); then
     popd >/dev/null
 
     msg "Generating module dependencies"
-    /sbin/depmod -b "$BUILDROOT" "${KERNELVERSION}"
+    depmod -b "$BUILDROOT" "${KERNELVERSION}"
     rm "$BUILDROOT/lib/modules/$KERNELVERSION"/modules.!(dep.bin|alias.bin|symbols.bin)
 else
     warning "No modules were added to the image. This is probably not what you want."
-- 
1.7.8.1



More information about the arch-projects mailing list