Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164496395
D26654.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26654.diff
View Options
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -672,7 +672,7 @@
# Note that setting securelevel to 0 will result
# in the system booting with securelevel set to 1, as
# init(8) will raise the level when rc(8) completes.
-update_motd="YES" # update version info in /etc/motd (or NO)
+update_motd="YES" # update version info in /var/run/motd (or NO)
entropy_boot_file="/boot/entropy" # Set to NO to disable very early
# (used at early boot time) entropy caching through reboots.
entropy_file="/entropy" # Set to NO to disable late (used when going multi-user)
diff --git a/libexec/rc/rc.d/motd b/libexec/rc/rc.d/motd
--- a/libexec/rc/rc.d/motd
+++ b/libexec/rc/rc.d/motd
@@ -54,5 +54,24 @@
check_startmsgs && echo '.'
}
+motd_start_static()
+{
+ if [ ! -e "${TARGET}" ]; then
+ if [ -r "$COMPAT_MOTD" ]; then
+ install -C -o root -g wheel -m "${PERMS}" "$COMPAT_MOTD" "${TARGET}"
+ else
+ install -C -o root -g wheel -m "${PERMS}" "$TEMPLATE" "${TARGET}"
+ fi
+ fi
+}
+
load_rc_config $name
+if ! checkyesno $rcvar
+then
+ case $1 in
+ start|faststart|forcestart|onestart|quietstart)
+ motd_start_static
+ ;;
+ esac
+fi
run_rc_command "$1"
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -2345,12 +2345,12 @@
.Pq Vt bool
If set to
.Dq Li YES ,
-.Pa /etc/motd
+.Pa /var/run/motd
will be updated at boot time to reflect the kernel release
being run.
If set to
.Dq Li NO ,
-.Pa /etc/motd
+.Pa /var/run/motd
will not be updated.
.It Va nfs_client_enable
.Pq Vt bool
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 2, 10:25 AM (11 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35844410
Default Alt Text
D26654.diff (1 KB)
Attached To
Mode
D26654: Support immutable motd when /var/run is tmpfs
Attached
Detach File
Event Timeline
Log In to Comment