Index: head/libexec/rc/rc.d/zpool =================================================================== --- head/libexec/rc/rc.d/zpool (revision 365347) +++ head/libexec/rc/rc.d/zpool (revision 365348) @@ -1,31 +1,31 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: zpool -# REQUIRE: hostid +# REQUIRE: hostid disks # BEFORE: zvol mountcritlocal # KEYWORD: nojail . /etc/rc.subr name="zpool" desc="Import ZPOOLs" rcvar="zfs_enable" start_cmd="zpool_start" required_modules="zfs" zpool_start() { local cachefile for cachefile in /etc/zfs/zpool.cache /boot/zfs/zpool.cache; do if [ -r $cachefile ]; then zpool import -c $cachefile -a -N && break fi done } load_rc_config $name run_rc_command "$1" Index: head/libexec/rc/rc.d/zvol =================================================================== --- head/libexec/rc/rc.d/zvol (revision 365347) +++ head/libexec/rc/rc.d/zvol (revision 365348) @@ -1,47 +1,46 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: zvol # REQUIRE: zpool -# BEFORE: dumpon # KEYWORD: nojail . /etc/rc.subr name="zvol" desc="Activate swap on ZVOLs" rcvar="zfs_enable" start_cmd="zvol_start" stop_cmd="zvol_stop" required_modules="zfs" zvol_start() { # Enable swap on ZVOLs with property org.freebsd:swap=on. zfs list -H -o org.freebsd:swap,name -t volume | while read state name; do case "${state}" in ([oO][nN]) swapon /dev/zvol/${name} ;; esac done } zvol_stop() { # Disable swap on ZVOLs with property org.freebsd:swap=on. zfs list -H -o org.freebsd:swap,name -t volume | while read state name; do case "${state}" in ([oO][nN]) swapoff /dev/zvol/${name} ;; esac done } load_rc_config $name run_rc_command "$1"