1#!/bin/sh
2
3# PROVIDE: zpoolreguid
4# REQUIRE: zpool
5# BEFORE: mountcritlocal
6# KEYWORD: firstboot nojail
7
8. /etc/rc.subr
9
10name="zpoolreguid"
11desc="Generate a new zpool GUID"
12rcvar="zfs_enable"
13start_cmd="zpoolreguid_start"
14
15zpoolreguid_start()
16{
17	local pool
18
19	for pool in ${zpool_reguid}; do
20		zpool reguid $pool
21	done
22}
23
24load_rc_config $name
25
26# doesn't make sense to run in a svcj: config setting
27zpoolreguid_svcj="NO"
28
29run_rc_command "$1"
30