From 4a8eeedbb1e30f63f22646fa6f92da6181948362 Mon Sep 17 00:00:00 2001 From: Sheldon Hearn Date: Sat, 29 Dec 2001 19:42:55 +0000 Subject: [PATCH] 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'. --- etc/defaults/rc.conf | 4 ++-- etc/rc | 14 +++++++++++--- share/man/man5/rc.conf.5 | 16 ++++++++++++---- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 1f759af7b21..9d53cae06d9 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -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 ###################### diff --git a/etc/rc b/etc/rc index fc784b92eee..3422f8c8fa2 100644 --- a/etc/rc +++ b/etc/rc @@ -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%:*} diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 8b4b79e6bde..49d022a6151 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -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