From 984362a71ebef106d05a8f68f241c5c610ff6547 Mon Sep 17 00:00:00 2001 From: Lorenz Hüdepohl Date: Thu, 21 Jan 2021 21:59:24 +0100 Subject: dracut: Support /usr/bin as 'systemctl' path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On openSUSE the initrd has systemctl in /usr/bin, check this path as well. Reviewed-by: Brian Behlendorf Reviewed-by: Richard Laager Signed-off-by: Lorenz Hüdepohl Closes #11487 --- contrib/dracut/90zfs/zfs-env-bootfs.service.in | 2 +- contrib/dracut/90zfs/zfs-load-key.sh.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/dracut/90zfs/zfs-env-bootfs.service.in b/contrib/dracut/90zfs/zfs-env-bootfs.service.in index 3cdf69100..2bc43482c 100644 --- a/contrib/dracut/90zfs/zfs-env-bootfs.service.in +++ b/contrib/dracut/90zfs/zfs-env-bootfs.service.in @@ -8,7 +8,7 @@ Before=zfs-import.target [Service] Type=oneshot -ExecStart=/bin/sh -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -v '^-$')" +ExecStart=/bin/sh -c "systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -v '^-$')" [Install] WantedBy=zfs-import.target diff --git a/contrib/dracut/90zfs/zfs-load-key.sh.in b/contrib/dracut/90zfs/zfs-load-key.sh.in index e29501418..9b7716ae9 100755 --- a/contrib/dracut/90zfs/zfs-load-key.sh.in +++ b/contrib/dracut/90zfs/zfs-load-key.sh.in @@ -1,7 +1,7 @@ #!/bin/sh # only run this on systemd systems, we handle the decrypt in mount-zfs.sh in the mount hook otherwise -[ -e /bin/systemctl ] || return 0 +[ -e /bin/systemctl ] || [ -e /usr/bin/systemctl ] || return 0 # This script only gets executed on systemd systems, see mount-zfs.sh for non-systemd systems -- cgit v1.2.3