Don't use absolute paths for utilities
authorSeewer Philippe <philippe.seewer@bfh.ch>
Thu, 2 Jul 2009 14:03:39 +0000 (16:03 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 2 Jul 2009 15:13:06 +0000 (17:13 +0200)
dracut
dracut-functions

diff --git a/dracut b/dracut
index 826fbda..1d440ef 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -61,6 +61,8 @@ while (($# > 0)); do
     shift
 done
 
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
+
 [[ $debug ]] && { 
     export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): ';
     set -x
@@ -138,8 +140,8 @@ echo $mods_to_load
 ## final stuff that has to happen
 
 # generate module dependencies for the initrd
-if ! /sbin/depmod -a -b "$initdir" $kernel; then
-    echo "\"/sbin/depmod -a $kernel\" failed."
+if ! depmod -a -b "$initdir" $kernel; then
+    echo "\"depmod -a $kernel\" failed."
     exit 1
 fi
 
index 77e635b..43373a0 100755 (executable)
@@ -307,7 +307,7 @@ instmods() {
                    fi
                    inst_simple "$modpath"
                done
-               for fw in $(/sbin/modinfo -F firmware $mod 2>/dev/null); do
+               for fw in $(modinfo -F firmware $mod 2>/dev/null); do
                    if [[ -f /lib/firmware/$fw ]]; then
                        inst_simple "/lib/firmware/$fw"
                    else