Sun Feb 20 14:42:08 2022 UTC ()
Enable critical_filesystems_zfs.


(alnsn)
diff -r1.161 -r1.162 src/etc/defaults/rc.conf
diff -r1.16 -r1.17 src/etc/rc.d/mountcritlocal

cvs diff -r1.161 -r1.162 src/etc/defaults/rc.conf (expand / switch to unified diff)

--- src/etc/defaults/rc.conf 2021/01/10 23:24:25 1.161
+++ src/etc/defaults/rc.conf 2022/02/20 14:42:07 1.162
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: rc.conf,v 1.161 2021/01/10 23:24:25 riastradh Exp $ 1# $NetBSD: rc.conf,v 1.162 2022/02/20 14:42:07 alnsn Exp $
2# 2#
3# /etc/defaults/rc.conf -- 3# /etc/defaults/rc.conf --
4# default configuration of /etc/rc.conf 4# default configuration of /etc/rc.conf
5# 5#
6# see rc.conf(5) for more information. 6# see rc.conf(5) for more information.
7# 7#
8# DO NOT EDIT THIS FILE DIRECTLY; IT MAY BE REPLACED DURING A SYSTEM UPGRADE. 8# DO NOT EDIT THIS FILE DIRECTLY; IT MAY BE REPLACED DURING A SYSTEM UPGRADE.
9# EDIT /etc/rc.conf INSTEAD. 9# EDIT /etc/rc.conf INSTEAD.
10# 10#
11 11
12# 12#
13# Use program=YES to enable program, NO to disable it. program_flags are 13# Use program=YES to enable program, NO to disable it. program_flags are
14# passed to the program on the command line. 14# passed to the program on the command line.
@@ -82,26 +82,27 @@ defaultroute6="" @@ -82,26 +82,27 @@ defaultroute6=""
82# If blank, use /etc/defaultdomain. 82# If blank, use /etc/defaultdomain.
83# 83#
84domainname="" 84domainname=""
85 85
86# Filesystems to mount early in boot-up. 86# Filesystems to mount early in boot-up.
87# Note that `/var' is needed in $critical_filesystems_local (or 87# Note that `/var' is needed in $critical_filesystems_local (or
88# implied as part of `/') as certain services that need /var (such as 88# implied as part of `/') as certain services that need /var (such as
89# dhcpcd) may be needed to get the network operational enough to mount 89# dhcpcd) may be needed to get the network operational enough to mount
90# the $critical_filesystems_remote. Prepending "OPTIONAL:" means it 90# the $critical_filesystems_remote. Prepending "OPTIONAL:" means it
91# will not be an error if that file system is not present in fstab(5). 91# will not be an error if that file system is not present in fstab(5).
92# 92#
93critical_filesystems_local="OPTIONAL:/var" 93critical_filesystems_local="OPTIONAL:/var"
94critical_filesystems_remote="OPTIONAL:/usr" 94critical_filesystems_remote="OPTIONAL:/usr"
 95critical_filesystems_zfs=""
95 96
96# Swap device controls. 97# Swap device controls.
97# 98#
98no_swap=NO # Set to YES if you have purposefully setup no swap 99no_swap=NO # Set to YES if you have purposefully setup no swap
99 # partitions and don't want to be warned about it. 100 # partitions and don't want to be warned about it.
100swapoff=YES # Remove block-type swap partitions upon shutdown 101swapoff=YES # Remove block-type swap partitions upon shutdown
101 # This defaults to yes, so that raids shutdown cleanly 102 # This defaults to yes, so that raids shutdown cleanly
102swapoff_umount=auto # Set to 'manual' to umount the tmpfs partitions listed 103swapoff_umount=auto # Set to 'manual' to umount the tmpfs partitions listed
103 # in swapoff_umount_fs before removing swap. Set to 104 # in swapoff_umount_fs before removing swap. Set to
104 # 'auto' to umount all tmpfs partitions that contain 105 # 'auto' to umount all tmpfs partitions that contain
105 # no device nodes. 106 # no device nodes.
106swapoff_umount_fs= # space-separated list of tmpfs mount points to umount 107swapoff_umount_fs= # space-separated list of tmpfs mount points to umount
107 # before removing swap if swapoff_umount=manual 108 # before removing swap if swapoff_umount=manual

cvs diff -r1.16 -r1.17 src/etc/rc.d/mountcritlocal (expand / switch to unified diff)

--- src/etc/rc.d/mountcritlocal 2020/07/22 16:50:41 1.16
+++ src/etc/rc.d/mountcritlocal 2022/02/20 14:42:07 1.17
@@ -1,26 +1,30 @@ @@ -1,26 +1,30 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: mountcritlocal,v 1.16 2020/07/22 16:50:41 martin Exp $ 3# $NetBSD: mountcritlocal,v 1.17 2022/02/20 14:42:07 alnsn Exp $
4# 4#
5 5
6# PROVIDE: mountcritlocal 6# PROVIDE: mountcritlocal
7# REQUIRE: fsck 7# REQUIRE: fsck
8 8
9$_rc_subr_loaded . /etc/rc.subr 9$_rc_subr_loaded . /etc/rc.subr
10 10
11name="mountcritlocal" 11name="mountcritlocal"
12start_cmd="mountcritlocal_start" 12start_cmd="mountcritlocal_start"
13stop_cmd=":" 13stop_cmd=":"
14 14
15mountcritlocal_start() 15mountcritlocal_start()
16{ 16{
17 # Mount critical file systems that are `local' 17 # Mount critical file systems that are `local'
18 # (as specified in $critical_filesystems_local) 18 # (as specified in $critical_filesystems_local)
19 # This usually includes /var. 19 # This usually includes /var.
20 # 20 #
21 mount_critical_filesystems local || return $? 21 mount_critical_filesystems local || return $?
 22 if checkyesno zfs; then
 23 mount_critical_filesystems_zfs || return $?
 24 fi
22 return 0 25 return 0
23} 26}
24 27
25load_rc_config $name 28load_rc_config $name
 29load_rc_config_var zfs zfs
26run_rc_command "$1" 30run_rc_command "$1"