Wednesday, December 29, 2010

Permanently Change MOTD in Debian Lenny

To permanetly change the MOTD in Debian Lenny so that it doesn't get always get re-written do the following:

Open /etc/init.d/bootmisc.sh
Find this section:
# Update motd
uname -snrvm > /var/run/motd
[ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd

Make it look like this: (comment out the uname line):

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

Then edit /etc/motd.tail and put into it whatever you want your MOTD to be.

No comments:

Post a Comment