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 @@ -2,7 +2,7 @@ .\" .\" This file is in the public domain. .\" -.Dd October 18, 2020 +.Dd February 1, 2024 .Dt MOTD 5 .Os .Sh NAME @@ -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 @@ -46,7 +41,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