Replace $critical_filesystems_beforenet with $critical_filesystems_local .
Replace $critical_filesystems with $critical_filesystems_remote . The new names are now consistent with the type argument that mount_critical_filesystems() is called with, and allows for other types to be easily supported by that function. For backwards compatibility purposes, if the now obsolete variable is defined (even empty), it takes precedence over the new form, and you will be warned. If you want to stop the warnings, update your rc.conf(5) settings!
This commit is contained in:
parent
1dad4ca74f
commit
5ee7ac8886
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: rc.conf,v 1.33 2002/03/21 23:08:35 lukem Exp $
|
||||
# $NetBSD: rc.conf,v 1.34 2002/03/27 08:53:39 lukem Exp $
|
||||
#
|
||||
# /etc/defaults/rc.conf --
|
||||
# default configuration of /etc/rc.conf
|
||||
|
@ -59,13 +59,13 @@ defaultroute=""
|
|||
domainname=""
|
||||
|
||||
# Filesystems to mount early in boot-up.
|
||||
# Note that `/var' is needed in $critical_filesystems_beforenet (or
|
||||
# Note that `/var' is needed in $critical_filesystems_local (or
|
||||
# implied as part of `/') as certain services that need /var (such as
|
||||
# dhclient) may be needed to get the network operational enough to mount
|
||||
# the $critical_filesystems.
|
||||
# the $critical_filesystems_remote.
|
||||
#
|
||||
critical_filesystems_beforenet="/var"
|
||||
critical_filesystems="/usr"
|
||||
critical_filesystems_local="/var"
|
||||
critical_filesystems_remote="/usr"
|
||||
|
||||
# Swap device controls.
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: mountcritlocal,v 1.5 2001/02/28 17:19:42 lukem Exp $
|
||||
# $NetBSD: mountcritlocal,v 1.6 2002/03/27 08:53:42 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mountcritlocal
|
||||
|
@ -14,8 +14,17 @@ stop_cmd=":"
|
|||
|
||||
mountcritlocal_start()
|
||||
{
|
||||
# If obsolete $critical_filesystems_beforenet is set,
|
||||
# use that instead of $critical_filesystems_local.
|
||||
#
|
||||
if [ -n "$critical_filesystems_beforenet" -o \
|
||||
"${critical_filesystems_beforenet-unset}" != "unset" ]; then
|
||||
warn 'Overriding $critical_filesystems_local with obsolete $critical_filesystems_beforenet'
|
||||
critical_filesystems_local=$critical_filesystems_beforenet
|
||||
fi
|
||||
|
||||
# Mount critical filesystems that are `local'
|
||||
# (as specified in $critical_filesystems_beforenet)
|
||||
# (as specified in $critical_filesystems_local)
|
||||
# This usually includes /var.
|
||||
#
|
||||
mount_critical_filesystems local
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: mountcritremote,v 1.5 2002/01/31 01:26:06 lukem Exp $
|
||||
# $NetBSD: mountcritremote,v 1.6 2002/03/27 08:53:42 lukem Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: mountcritremote
|
||||
|
@ -8,13 +8,28 @@
|
|||
|
||||
. /etc/rc.subr
|
||||
|
||||
# Mount critical filesystems that may be remote.
|
||||
# (as specified in $critical_filesystems)
|
||||
# This usually includes /usr.
|
||||
#
|
||||
name="mountcritremote"
|
||||
start_cmd="mount_critical_filesystems remote"
|
||||
start_cmd="mountcritremote_start"
|
||||
stop_cmd=":"
|
||||
|
||||
mountcritremote_start()
|
||||
{
|
||||
# If obsolete $critical_filesystems is set,
|
||||
# use that instead of $critical_filesystems_remote.
|
||||
#
|
||||
if [ -n "$critical_filesystems" -o \
|
||||
"${critical_filesystems-unset}" != "unset" ]; then
|
||||
warn 'Overriding $critical_filesystems_remote with obsolete $critical_filesystems'
|
||||
critical_filesystems_remote=$critical_filesystems
|
||||
fi
|
||||
|
||||
# Mount critical filesystems that may be `remote'.
|
||||
# (as specified in $critical_filesystems_remote)
|
||||
# This usually includes /usr.
|
||||
#
|
||||
mount_critical_filesystems remote
|
||||
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
|
15
etc/rc.subr
15
etc/rc.subr
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: rc.subr,v 1.46 2002/03/22 04:16:38 lukem Exp $
|
||||
# $NetBSD: rc.subr,v 1.47 2002/03/27 08:53:42 lukem Exp $
|
||||
#
|
||||
# Copyright (c) 1997-2002 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -81,17 +81,14 @@ reverse_list()
|
|||
}
|
||||
|
||||
#
|
||||
# mount_critical_filesystems
|
||||
# Go through the list of critical filesystems, checking each one
|
||||
# to see if it is mounted, and if it is not, mounting it.
|
||||
# mount_critical_filesystems type
|
||||
# Go through the list of critical filesystems as provided in
|
||||
# the rc.conf(5) variable $critical_filesystems_${type}, checking
|
||||
# each one to see if it is mounted, and if it is not, mounting it.
|
||||
#
|
||||
mount_critical_filesystems()
|
||||
{
|
||||
if [ $1 = local ]; then
|
||||
_fslist=$critical_filesystems_beforenet
|
||||
else
|
||||
_fslist=$critical_filesystems
|
||||
fi
|
||||
eval _fslist=\$critical_filesystems_${1}
|
||||
for _fs in $_fslist; do
|
||||
mount | (
|
||||
_ismounted=no
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: rc.conf.5,v 1.56 2002/03/21 23:14:03 lukem Exp $
|
||||
.\" $NetBSD: rc.conf.5,v 1.57 2002/03/27 08:53:43 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996 Matthew R. Green
|
||||
.\" Copyright (c) 1997 Curt J. Sampson
|
||||
|
@ -32,7 +32,7 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd March 22, 2002
|
||||
.Dd March 27, 2002
|
||||
.Dt RC.CONF 5
|
||||
.Os
|
||||
.\" turn off hyphenation
|
||||
|
@ -140,7 +140,7 @@ If empty or not set, then the contents of
|
|||
.El
|
||||
.Ss Boottime file-system and swap configuration
|
||||
.Bl -tag -width net_interfaces
|
||||
.It Sy critical_filesystems_beforenet
|
||||
.It Sy critical_filesystems_local
|
||||
A string.
|
||||
File systems mounted very early in the system boot before networking
|
||||
services are available.
|
||||
|
@ -149,7 +149,7 @@ Usually
|
|||
is part of this, because it is needed by services such as
|
||||
.Xr dhclient 8
|
||||
which may be required to get the network operational.
|
||||
.It Sy critical_filesystems
|
||||
.It Sy critical_filesystems_remote
|
||||
A string.
|
||||
File systems such as
|
||||
.Pa /usr
|
||||
|
@ -393,7 +393,7 @@ to
|
|||
you must either have
|
||||
.Pa /var
|
||||
in
|
||||
.Sy critical_filesystems_beforenet ,
|
||||
.Sy critical_filesystems_local ,
|
||||
as part of
|
||||
.Pa / ,
|
||||
or direct the DHCP client to store the leases file on the root
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: rc.subr.8,v 1.6 2002/03/24 15:32:59 lukem Exp $
|
||||
.\" $NetBSD: rc.subr.8,v 1.7 2002/03/27 08:53:43 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
|
@ -34,7 +34,7 @@
|
|||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd March 25, 2002
|
||||
.Dd March 27, 2002
|
||||
.Dt RC.SUBR 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -234,24 +234,13 @@ mechanism for an administrator to override the behaviour of a given
|
|||
.Xr rc.d 8
|
||||
script without requiring the editing of that script.
|
||||
.It Ic mount_critical_filesystems Ar type
|
||||
Go through a list of critical file systems, mounting each one that
|
||||
is not currently mounted.
|
||||
If
|
||||
.Ar type
|
||||
is
|
||||
.Sq local ,
|
||||
use the
|
||||
Go through a list of critical file systems,
|
||||
as found in the
|
||||
.Xr rc.conf 5
|
||||
variable
|
||||
.Sy critical_filesystems_beforenet
|
||||
for the list of critical file systems.
|
||||
Otherwise
|
||||
(where
|
||||
.Ar type
|
||||
should be
|
||||
.Sq remote ) ,
|
||||
use
|
||||
.Sy critical_filesystems .
|
||||
.Sy critical_filesystems_ Ns Ar type ,
|
||||
mounting each one that
|
||||
is not currently mounted.
|
||||
.It Ic rc_usage Ar command Op Ar ...
|
||||
Print a usage message for
|
||||
.Va $0 ,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# $NetBSD: form,v 1.5 2002/02/21 20:00:13 garbled Exp $
|
||||
# $NetBSD: form,v 1.6 2002/03/27 08:53:43 lukem Exp $
|
||||
script:script1,do_rcshutdown Run /etc/rc.shutdown?
|
||||
iscript:3,1,999,script2,rcshutdown_timeout Number of seconds before terminating shutdown
|
||||
escript:15,script2,hostname Hostname, if blank use /etc/myname
|
||||
escript:15,script2,defaultroute Default Route, if blank use /etc/mygate
|
||||
escript:15,script2,domainname NIS Domain Name, if blank use /etc/defaultdomain
|
||||
escript:15,script2,critical_filesystems_beforenet Filesystems to mount before network config
|
||||
escript:15,script2,critical_filesystems Filesystems to mount early in boot process
|
||||
escript:15,script2,critical_filesystems_local Filesystems to mount before network config
|
||||
escript:15,script2,critical_filesystems_remote Filesystems to mount early in boot process
|
||||
script:script1,no_swap Set to yes if you have no swap configured
|
||||
script:script1,lkm Run /etc/rc.lkm
|
||||
script:script1,savecore Run savecore at boot?
|
||||
|
|
Loading…
Reference in New Issue