From a55711cd861bc7f24911204403126b1c85245e59 Mon Sep 17 00:00:00 2001 From: Seewer Philippe Date: Thu, 2 Jul 2009 16:03:39 +0200 Subject: [PATCH] Don't use absolute paths for utilities --- dracut | 6 ++++-- dracut-functions | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dracut b/dracut index 826fbda..1d440ef 100755 --- 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 diff --git a/dracut-functions b/dracut-functions index 77e635b..43373a0 100755 --- a/dracut-functions +++ b/dracut-functions @@ -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 -- 2.7.4