[PATCH 2/2] dracut-functions.sh: find_binary: path starting with variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Credits go to Alexander Tsoy <bugs+gentoo@xxxxxxxxxxx> 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
---
 dracut-functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index 8f59ff4..58b0b4d 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -45,7 +45,7 @@ find_binary() {
         fi
     fi
 
-    type -P $1
+    type -P ${1##*/}
 }
 
 if ! [[ $dracutbasedir ]]; then
-- 
1.7.12

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux