Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/contrib/dracut/90zfs/zfs-load-key.sh.in
#!/bin/sh | #!/bin/sh | ||||
# only run this on systemd systems, we handle the decrypt in mount-zfs.sh in the mount hook otherwise | # 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 | # This script only gets executed on systemd systems, see mount-zfs.sh for non-systemd systems | ||||
# import the libs now that we know the pool imported | # import the libs now that we know the pool imported | ||||
[ -f /lib/dracut-lib.sh ] && dracutlib=/lib/dracut-lib.sh | [ -f /lib/dracut-lib.sh ] && dracutlib=/lib/dracut-lib.sh | ||||
[ -f /usr/lib/dracut/modules.d/99base/dracut-lib.sh ] && dracutlib=/usr/lib/dracut/modules.d/99base/dracut-lib.sh | [ -f /usr/lib/dracut/modules.d/99base/dracut-lib.sh ] && dracutlib=/usr/lib/dracut/modules.d/99base/dracut-lib.sh | ||||
# shellcheck source=./lib-zfs.sh.in | # shellcheck source=./lib-zfs.sh.in | ||||
. "$dracutlib" | . "$dracutlib" | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |