Index: libexec/rc/rc.d/mountcritlocal =================================================================== --- libexec/rc/rc.d/mountcritlocal +++ libexec/rc/rc.d/mountcritlocal @@ -4,7 +4,7 @@ # # PROVIDE: mountcritlocal -# REQUIRE: root hostid_save mdconfig +# REQUIRE: root hostid_save mdconfig zvol # KEYWORD: nojail shutdown . /etc/rc.subr Index: libexec/rc/rc.d/zpool =================================================================== --- /dev/null +++ libexec/rc/rc.d/zpool @@ -0,0 +1,32 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: zpool +# REQUIRE: hostid +# BEFORE: zvol mountcritlocal +# KEYWORD: nojail + +. /etc/rc.subr + +name="zpool" +desc="Import ZPOOLs" +rcvar="zfs_enable" +start_cmd="zpool_start" +stop_cmd="zpool_stop" +required_modules="zfs" + +zvol_start() +{ + local cachefile + + for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do + if [ -r $cachefile ]; then + zpool import -c $cachefile -a -N + fi + done +} + +load_rc_config $name +run_rc_command "$1" Index: libexec/rc/rc.d/zvol =================================================================== --- libexec/rc/rc.d/zvol +++ libexec/rc/rc.d/zvol @@ -4,7 +4,7 @@ # # PROVIDE: zvol -# REQUIRE: hostid +# REQUIRE: zpool # BEFORE: dumpon # KEYWORD: nojail