From 70d2dd922b3b8802e9549d8ef3276dce7d9f322b Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Sat, 23 Nov 2019 16:16:06 +0100 Subject: [PATCH] Fix non-absolute path in systemd mount generator Systemd will ignore units that try to execute programs from non-absolute paths. Use hardcoded /bin/sh instead. Reviewed-by: Antonio Russo Reviewed-by: Richard Laager Signed-off-by: InsanePrawn Closes #9611 --- etc/systemd/system-generators/zfs-mount-generator.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/systemd/system-generators/zfs-mount-generator.in b/etc/systemd/system-generators/zfs-mount-generator.in index 4f9443a91c..2eba747160 100755 --- a/etc/systemd/system-generators/zfs-mount-generator.in +++ b/etc/systemd/system-generators/zfs-mount-generator.in @@ -181,7 +181,7 @@ process_line() { pathdep="RequiresMountsFor='${p_keyloc#file://}'" keyloadcmd="@sbindir@/zfs load-key '${dataset}'" elif [ "${p_keyloc}" = "prompt" ] ; then - keyloadcmd="sh -c 'set -eu;"\ + keyloadcmd="/bin/sh -c 'set -eu;"\ "keystatus=\"\$\$(@sbindir@/zfs get -H -o value keystatus \"${dataset}\")\";"\ "[ \"\$\$keystatus\" = \"unavailable\" ] || exit 0;"\ "count=0;"\