summaryrefslogtreecommitdiff
path: root/etc/rc.d/mountcritlocal
blob: 96cdc0014605b62a404d1f825f56e3aaca7422a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
#
# $NetBSD: mountcritlocal,v 1.17 2022/02/20 14:42:07 alnsn Exp $
#

# PROVIDE: mountcritlocal
# REQUIRE: fsck

$_rc_subr_loaded . /etc/rc.subr

name="mountcritlocal"
start_cmd="mountcritlocal_start"
stop_cmd=":"

mountcritlocal_start()
{
	#	Mount critical file systems that are `local'
	#	(as specified in $critical_filesystems_local)
	#	This usually includes /var.
	#
	mount_critical_filesystems local || return $?
	if checkyesno zfs; then
		mount_critical_filesystems_zfs || return $?
	fi
	return 0
}

load_rc_config $name
load_rc_config_var zfs zfs
run_rc_command "$1"