xref: /freebsd/libexec/rc/rc.d/zpoolreguid (revision d30a1689f5b37e78ea189232a8b94a7011dc0dc8)
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
25run_rc_command "$1"
26