diff options
author | Giorgos Keramidas <keramida@FreeBSD.org> | 2004-11-09 10:03:17 +0000 |
---|---|---|
committer | Giorgos Keramidas <keramida@FreeBSD.org> | 2004-11-09 10:03:17 +0000 |
commit | 8cfaa2f1f1d5cd27ef2d5f2317cd40c6b07b9c09 (patch) | |
tree | 0a11e0afec881d2f75d5f712bf77d980818490ec /etc | |
parent | 5e7b2330553e7f56662b281704dcdc58165234bc (diff) | |
download | src-8cfaa2f1f1d5cd27ef2d5f2317cd40c6b07b9c09.tar.gz src-8cfaa2f1f1d5cd27ef2d5f2317cd40c6b07b9c09.zip |
Add two new rc.conf options: tmpmfs_flags and varmfs_flags.
These can be used to pass extra options to the mdmfs(8) utility,
to customize the finer details of the md file system creation
(i.e. to turn on/off softupdates, to specify a default owner for md
filesystem, etc).
Use these two new flags to mount tmpmfs and varmfs without
softupdates, since it doesn't make much sense to use SU on
malloc-backed file systems.
Reviewed by: mtm
Inspired by: J. D. Bronson, jbronson at wixb dot com
Notes
Notes:
svn path=/head/; revision=137451
Diffstat (limited to 'etc')
-rw-r--r-- | etc/defaults/rc.conf | 2 | ||||
-rw-r--r-- | etc/rc.d/tmp | 4 | ||||
-rw-r--r-- | etc/rc.d/var | 4 | ||||
-rw-r--r-- | etc/rc.subr | 6 |
4 files changed, 9 insertions, 7 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 9909ff85a396..4d792653f998 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -40,8 +40,10 @@ pccard_ether_delay="5" # Delay before trying to start dhclient in pccard_ether removable_interfaces="" # Removable network interfaces for /etc/pccard_ether. tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never tmpsize="20m" # Size of mfs /tmp if created +tmpmfs_flags="-S -o noexec,nosuid,nodev" # Extra mdmfs options for the mfs /tmp varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never varsize="32m" # Size of mfs /var if created +varmfs_flags="-S" # Extra mount options for the mfs /var populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs. script_name_sep=" " # Change if your startup scripts' names contain spaces diff --git a/etc/rc.d/tmp b/etc/rc.d/tmp index 0c7a460a0c30..9b0d74b31f47 100644 --- a/etc/rc.d/tmp +++ b/etc/rc.d/tmp @@ -42,7 +42,7 @@ load_rc_config $name # case "${tmpmfs}" in [Yy][Ee][Ss]) - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" chmod 01777 /tmp ;; [Nn][Oo]) @@ -56,7 +56,7 @@ case "${tmpmfs}" in echo "dropping into shell, ^D to continue anyway." /bin/sh else - mount_md ${tmpsize} /tmp + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" chmod 01777 /tmp fi fi diff --git a/etc/rc.d/var b/etc/rc.d/var index 7a4baf425db0..1e506c0acd19 100644 --- a/etc/rc.d/var +++ b/etc/rc.d/var @@ -61,7 +61,7 @@ _populate_var() # case "${varmfs}" in [Yy][Ee][Ss]) - mount_md ${varsize} /var + mount_md ${varsize} /var "${varmfs_flags}" ;; [Nn][Oo]) ;; @@ -69,7 +69,7 @@ case "${varmfs}" in if (/bin/mkdir -p /var/.diskless 2> /dev/null); then rmdir /var/.diskless else - mount_md ${varsize} /var + mount_md ${varsize} /var "${varmfs_flags}" fi esac diff --git a/etc/rc.subr b/etc/rc.subr index bce54916583f..e0321491ed16 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -1289,12 +1289,12 @@ devfs_mount_jail() # as close as possible between 5-current and 4-stable. # $1 = size # $2 = mount point -# $3 = (optional) bytes-per-inode +# $3 = (optional) extra mdmfs flags mount_md() { if [ -n "$3" ]; then - bpi="-i $3" + flags="$3" fi - /sbin/mdmfs $bpi -s $1 -M md $2 + /sbin/mdmfs $flags -s $1 -M md $2 } fi |