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

Guy Yur guyyur at
Mon Apr 5 10:01:07 UTC 2021


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.

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.

I think reverting /etc/motd change in login(1) and login.conf as
suggested in 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:

Guy Yur

More information about the freebsd-current mailing list