On Sat, 17 Oct 2020, Dan Mack wrote:

I've been away for a while and missed the change and complexity added to /etc/motd. I figured it out but I was led astray by not knowing that it was converted into a service that only runs at boot time. If you just follow the instructions in the template file, you will nothing changes.

As a suggestion, maybe change this line in the /etc/motd.template file:

Edit /etc/motd.template to change this login announcement.

to:

Edit /etc/motd.template to change this login announcement and
reboot or manually restart the motd service in /etc/rc.d/motd as in:

/etc/rc.d/motd restart

and also add an entry to the man page for motd.

This was on:  FreeBSD boxolox 13.0-CURRENT FreeBSD 13.0-CURRENT #1
             r366790: Sat Oct 17 08:57:56 CDT 2020

Instead of just complaining, I've attached a diff of a proposed
fix.  Diff against base/head is here fwiw:
   https://github.com/danmack/freebsd/tree/motd-doc-fix

Dan



diff --git a/share/man/man5/motd.5 b/share/man/man5/motd.5
index 9feb0479b92..457c69da6b6 100644
--- a/share/man/man5/motd.5
+++ b/share/man/man5/motd.5
@@ -22,6 +22,14 @@ prepended to
 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
+motd service after updating
+.Pa /etc/motd.template:
+.Bd -literal -offset -ident
+service motd restart
+.Ed
+.Pp
 Individual users may suppress the display of this file by
 creating a file named
 .Dq Pa .hushlogin
diff --git a/usr.bin/login/motd.template b/usr.bin/login/motd.template
index 80d79095980..9973850c683 100644
--- a/usr.bin/login/motd.template
+++ b/usr.bin/login/motd.template
@@ -17,4 +17,5 @@ Please include that output and any error messages when 
posting questions.
 Introduction to manual pages:  man man
 FreeBSD directory layout:      man hier
 
-Edit /etc/motd.template to change this login announcement.
+To change this login announcement, edit /etc/motd.template and either
+reboot or restart the motd service in /etc/rc.d/motd.
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to