]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Add built in fallbacks for motd file
authorLudwig Nussel <ludwig.nussel@suse.de>
Fri, 7 Sep 2018 07:47:25 +0000 (09:47 +0200)
committerLudwig Nussel <ludwig.nussel@suse.de>
Fri, 7 Sep 2018 07:47:25 +0000 (09:47 +0200)
Use several locations for built in default for motd to allow for
e.g. run time generated motd without having to modify config files.
login.c already splits by colon.

/usr/share/misc/motd
  - chould be shipped by distributions
/run/motd
  - potentially run time created file with dynamic information
/etc/motd
  - for the admin fill with local information

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
include/pathnames.h

index abf0cdee98b71140605a0123febb3faa3e1cb710..3d5052e6f740be04e3aad4af79bdf25cea7ca056 100644 (file)
@@ -43,7 +43,7 @@
 #ifndef _PATH_MAILDIR
 # define _PATH_MAILDIR         "/var/spool/mail"
 #endif
-#define        _PATH_MOTDFILE          "/etc/motd"
+#define        _PATH_MOTDFILE          "/usr/share/misc/motd:/run/motd:/etc/motd"
 #ifndef _PATH_NOLOGIN
 # define _PATH_NOLOGIN         "/etc/nologin"
 #endif