summaryrefslogtreecommitdiffstats
path: root/contrib/dracut/90zfs/module-setup.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/dracut/90zfs/module-setup.sh.in')
-rwxr-xr-xcontrib/dracut/90zfs/module-setup.sh.in17
1 files changed, 9 insertions, 8 deletions
diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in
index 301375a5b..70eac8790 100755
--- a/contrib/dracut/90zfs/module-setup.sh.in
+++ b/contrib/dracut/90zfs/module-setup.sh.in
@@ -5,8 +5,11 @@ check() {
[ "${1}" = "-d" ] && return 0
# Verify the zfs tool chain
- which zpool >/dev/null 2>&1 || return 1
- which zfs >/dev/null 2>&1 || return 1
+ for tool in "@sbindir@/zpool" "@sbindir@/zfs" "@sbindir@/mount.zfs" ; do
+ test -x "$tool" || return 1
+ done
+ # Verify grep exists
+ which grep >/dev/null 2>&1 || return 1
return 0
}
@@ -31,20 +34,18 @@ install() {
inst_rules @udevruledir@/90-zfs.rules
inst_rules @udevruledir@/69-vdev.rules
inst_rules @udevruledir@/60-zvol.rules
+ dracut_install hostid
+ dracut_install grep
dracut_install @sbindir@/zfs
dracut_install @sbindir@/zpool
+ dracut_install @sbindir@/mount.zfs
dracut_install @udevdir@/vdev_id
dracut_install @udevdir@/zvol_id
- dracut_install mount.zfs
- dracut_install hostid
- dracut_install awk
- dracut_install head
inst_hook cmdline 95 "${moddir}/parse-zfs.sh"
if [ -n "$systemdutildir" ] ; then
inst_script "${moddir}/zfs-generator.sh" "$systemdutildir"/system-generators/dracut-zfs-generator
- else
- inst_hook mount 98 "${moddir}/mount-zfs.sh"
fi
+ inst_hook mount 98 "${moddir}/mount-zfs.sh"
inst_hook shutdown 30 "${moddir}/export-zfs.sh"
inst_simple "${moddir}/zfs-lib.sh" "/lib/dracut-zfs-lib.sh"