Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109939537
D43703.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
D43703.diff
View Options
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
@@ -21,10 +21,6 @@
motd_start()
{
- # Update kernel info in /var/run/motd
- # Must be done *before* interactive logins are possible
- # to prevent possible race conditions.
- #
startmsg -n 'Updating motd:'
if [ ! -f "${TEMPLATE}" ]; then
# Create missing template from existing regular motd file, if
@@ -43,13 +39,7 @@
ln -sF "${TARGET}" "${COMPAT_MOTD}"
fi
- T=`mktemp -t motd`
- uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\)$,\1 (\3) #\2,' \
- -e 's,^\([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\)$,\1 \2 (\4) \3,' > ${T}
- cat "${TEMPLATE}" >> ${T}
-
- install -C -o root -g wheel -m "${PERMS}" "$T" "${TARGET}"
- rm -f "$T"
+ install -C -o root -g wheel -m "${PERMS}" "${TEMPLATE}" "${TARGET}"
startmsg '.'
}
diff --git a/share/man/man5/motd.5 b/share/man/man5/motd.5
--- a/share/man/man5/motd.5
+++ b/share/man/man5/motd.5
@@ -15,11 +15,6 @@
.Xr login 1
after a user has logged in but before the shell is run.
It is generally used for important system-wide announcements.
-During system startup, a line containing the kernel version string is
-prepended to
-.Pa /etc/motd.template
-and the contents are written to
-.Pa /var/run/motd .
.Pp
.Pa /var/run/motd
can be updated without a system reboot by manually restarting the
@@ -48,7 +43,6 @@
.El
.Sh EXAMPLES
.Bd -literal
-FreeBSD 12.1-RELEASE (GENERIC) #0: Sun Dec 29 03:08:31 PST 2019
/home is full. Please cleanup your directories.
.Ed
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 12, 12:30 PM (18 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16610577
Default Alt Text
D43703.diff (1 KB)
Attached To
Mode
D43703: motd: stop prepending "uname -v" output dynamically
Attached
Detach File
Event Timeline
Log In to Comment