no message of the day displayed by login after reboot when update_motd="NO"

From: Guy Yur <guyyur_at_gmail.com>
Date: Mon, 5 Apr 2021 13:01:02 +0300
Hi,

login doesn't display the message of the day when update_motd="NO" after
the change to read /var/run/motd instead of /etc/motd.

When update_motd="NO":
If you create /var/run/motd manually it will be deleted
by cleanvar rc script after a reboot.
If you keep /var/run as tmpfs nothing creates /var/run/motd.

I updated bug 250081 that issue also exists for /var/run that is not tmpfs.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250081

My latest fix attempt was in motd rc script by copying motd.template if
motd doesn't exist to solve the /var/run as tmpfs and first install issues,
but I didn't know cleanvar also deletes the file, so I don't think it is a
good solution for /var/run that is not tmpfs.
https://reviews.freebsd.org/D26654

I think reverting /etc/motd change in login(1) and login.conf as
suggested in https://reviews.freebsd.org/D26654#610447 is better.
motd script will still need modification to always create
${COMPAT_MOTD} symlink.  Otherwise, if template already exists,
${COMPAT_MOTD} won't be created and login(1) will not find /etc/motd.
I think documentation changes are also required for update_motd="NO" case
as was done in second diff: https://reviews.freebsd.org/D26654?id=78733

Regards,
Guy Yur
Received on Mon Apr 05 2021 - 08:01:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:28 UTC