Don't require operators to override the list of network filesystem

types (networkfs_types) with a version that includes the original
list.

This increases the scope for user error and also means that systems with
networkfs_types set in /etc/rc.conf will not benefit from changes to the
list in /etc/defaults/rc.conf on upgrade.

Instead, store the default list in /etc/rc itself and allow the operator
to append to that list by specifying her own list in networkfs_types.

Rename networkfs_types to extra_netfs_types accordingly, as the new name
better describes the purpose of the variable.  Default the value to
'NO'.
This commit is contained in:
Sheldon Hearn 2001-12-29 19:42:55 +00:00
parent 01ecab4055
commit 4a8eeedbb1
3 changed files with 25 additions and 9 deletions

View file

@ -36,8 +36,8 @@ script_name_sep=" " # Change if your startup scripts' names contain spaces
rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
fsck_y_enable="NO" # Set to YES to do fsck -y if the initial preen fails.
background_fsck="YES" # Attempt to run fsck in the background where possible.
networkfs_types="nfs:NFS smbfs:SMB portalfs:PORTAL" # List of network
# filesystem types for delayed mount at startup.
extra_netfs_types="NO" # List of network extra filesystem types for delayed
# mount at startup (or NO).
##############################################################
### Network configuration sub-section ######################

14
etc/rc
View file

@ -267,10 +267,18 @@ esac
umount -a >/dev/null 2>&1
# Set up the list of network filesystem types for which mounting should be
# delayed until after network initialization.
networkfs_types='nfs:NFS smbfs:SMB portalfs:PORTAL'
case ${extra_netfs_types} in
[Nn][Oo])
;;
*)
networkfs_types="${networkfs_types} ${extra_netfs_types}"
;;
esac
# Mount everything except nfs filesystems.
if [ -z "${networkfs_types}" ]; then
networkfs_types='nfs:NFS smbfs:SMB portalfs:PORTAL'
fi
mount_excludes='no'
for i in ${networkfs_types}; do
fstype=${i%:*}

View file

@ -686,16 +686,24 @@ If set to
the system will attempt to run
.Xr fsck 8
in the background where possible.
.It Va networkfs_types
.It Va extra_netfs_types
.Pq Vt str
A whitespace-separated list of network filesystem descriptor pairs,
If set to something other than
.Dq NO
(the default),
this variable extends the list of filesystem types
for which automatic mounting at startup by
.Xr rc 8
should be delayed until the network is initialized.
It should contain
a whitespace-separated list of network filesystem descriptor pairs,
each consisting of a filesystem type as passed to
.Xr mount 8
and a human-readable, one-word description,
joined with a colon
.Pq Sq \&: .
This list can be extended as required to accommodate
third-party filesystem support.
Extending the default list in this way is only necessary
when third party filesystem types are used.
.It Va syslogd_enable
.Pq Vt bool
If set to