View Full Version : /etc/motd
02-08-2002, 04:32 PM
Is there a way to have this automatically change everyday, as in if I have a bunch of text files in a directory, is there some way I could get them to rotate in and out of being the motd?
02-08-2002, 06:04 PM
In /private/etc/daily there is this section:
if [ -f /etc/daily.local ]; then
echo "Running daily.local:"
So I would write up a script like:
mv /etc/motd.`date '+%a'` /etc/motd
And call it /etc/daily.local chown/chgrep/chmod it to root/wheel/750 and then create your 7 files:
With your messages. Note that you could choose to create motd files on the fly etc. for example with the output of fortune or some such stuff.
02-09-2002, 01:50 AM
If you use fink you can install:
fortune-mod 9708-2 Database of witticisms
Then just write:
in your ~/.cshrc file.
02-13-2002, 06:12 AM
Yes, fortune is good!
I never thought to mention that, I thought he might have wanted something specific for each day of the week like:
Monday - Post sales to ledger
Tuesday - Change left sock
Wednesday - water the cat
Thursday - Soup day!
02-13-2002, 09:33 AM
I was thinking more along the lines of what stetner originally posted, but fortune is really neat too.
Also, if I wanted to have it random instead of every day, I could just edit the fortune databases... The man pages for it are interesting. Try the -o flag.
philosphy of The Brotherhood, as handsomely summarized
in these words: we believe in healthy, hearty
laughter -- at the expense of the whole human race,
if needs be.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.