Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is this ever changed automatically by a system update?

I'm just wondering as I set a 'hilarious' one for a personal server off rackspace cloud, and it seems to have been deleted.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

See /etc/init.d/bootlogs

Specifically this line

# Update motd
uname -snrvm > /var/run/motd
[ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd

Meaning you should put your changes to motd in /etc/motd.tail otherwise its going to get overwritten on boot.

share|improve this answer
add comment

It might be interesting to add that editing /etc/motd.tail is not enough, the above snippet must be executed to update /etc/motd, the system only updates it on reboot (well, how often do you reboot your servers?)

Just out of lazyness, and because my server has no load anyways, I update /etc/motd every minute by using cron to execute exactly the code mentioned above.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.