MOTD Reset

If none of the more specific forums is the right place to ask

MOTD Reset

Postby Carlosinfl » 2007-02-07 14:37

I notice that when I change my /etc/motd file from the default to custom on my machine as root, when I reboot back into the same kernel, the MOTD is the default rather than what I changed it to before the reboot.

I have seen this on Ubuntu 6.10 as yell but I am not sure what is causing this.

Anyone know?
Carlosinfl
 
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

Postby neptho » 2007-02-08 02:07

It's hardcoded into /etc/init.d/bootmisc.sh, and with Etch, there's no 'leave it alone' variable. You can safely comment it out:

Code: Select all
/etc/init.d/bootmisc.sh:        # Update motd
/etc/init.d/bootmisc.sh:        uname -snrvm > /var/run/motd
/etc/init.d/bootmisc.sh:        [ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd
neptho
 
Posts: 10
Joined: 2007-02-07 00:10

Postby Carlosinfl » 2007-02-08 14:14

Is this bad practice to mod the MOTD? I just want to be sure I don't mess up the box or server down the road.
Carlosinfl
 
Posts: 889
Joined: 2005-02-05 06:11
Location: Orlando, FL

Postby neptho » 2007-02-08 20:04

Not really. Until recently, you could set variables to tell it 'LEAVE MY MOTD ALONE.' Just be aware that updated init scripts will revert your edits.

It is, however, considered bad form to reboot it often enough to worry about your motd. :wink:
neptho
 
Posts: 10
Joined: 2007-02-07 00:10

Postby kink » 2007-02-10 10:31

As the code quoted above shows, just put your text in /etc/motd.tail and everything will be ok.
User avatar
kink
Debian Developer, Site Admin
Debian Developer, Site Admin
 
Posts: 287
Joined: 2006-01-02 16:47
Location: Utrecht, The Netherlands


Return to General Questions

Who is online

Users browsing this forum: No registered users and 15 guests

fashionable