Comment 4 for bug 785424

Revision history for this message
nutznboltz (nutznboltz-deactivatedaccount) wrote :

 Manual page update-motd(5)

      Executable scripts in /etc/update-motd.d/* are executed by pam_motd(8)
       as the root user at each login, and this information is concatenated in
       /var/run/motd. The order of script execution is determined by the run-
       parts(8) --lsbsysinit option (basically alphabetical order, with a few
       caveats).

pam-1.1.1/debian/patches-applied/update-motd (fragment)

+ /* Run the update-motd dynamic motd scripts, outputting to /var/run/motd.
+ If /etc/motd -> /var/run/motd, the displayed MOTD will be dynamic.
+ Otherwise, the admin can force a static MOTD by breaking that symlink
+ and publishing into an /etc/motd text file. */
+ if ((stat("/etc/update-motd.d", &st) == 0) && S_ISDIR(st.st_mode)) {
+ if (!system("run-parts --lsbsysinit /etc/update-motd.d > /var/run/motd.new"))
+ rename("/var/run/motd.new", "/var/run/motd");
     }