dracut-functions.sh: find_binary: path starting with variable

Credits go to Alexander Tsoy <bugs+gentoo@puleglot.ru> who provided the
patch with following explanation:

  I get messages "Skipping program $env{DM_SBIN_PATH}/..." when
  generating initramfs. This happens because some udev rules contains
  variables in path to command:

  $ egrep -r 'IMPORT\{program\}=\"\$' /lib64/udev/rules.d/
  /lib64/udev/rules.d/10-dm.rules:ENV{DM_COOKIE}=="?*", IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup udevflags $env{DM_COOKIE}"

  [...]

  $ sudo dracut -f "" 3.5.4-hardened-r1
  I: *** Including module: dm ***
  I: Skipping program $env{DM_SBIN_PATH}/dmsetup using in udev rule 10-dm.rules as it cannot be found
master
Amadeusz Żołnowski 2012-10-07 15:29:03 +02:00 committed by Harald Hoyer
parent 585b3b37c0
commit 7e0d508002
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ find_binary() {
fi
fi

type -P $1
type -P ${1##*/}
}

if ! [[ $dracutbasedir ]]; then