LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-16-2004, 06:12 PM   #1
caphrim007
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
motd being weird


I dunno if anyone else has run into this or not but recently I installed Slackware 9.1 on my box and wanted to put my own custom motd in there so that I would see it whenever I ssh'd into the box. Well everything was fine until I restarted.

Initially I created a text file and ftp'd it to the comp, then I ran a
file.txt > /etc/motd
to dump the output to the motd file (Its a lot of stuff).

I did this through ssh and every time I would exit and ssh back in, I would get the motd that I wanted. Great, good.

The question is, the moment I restart the computer, the motd file is wiped and is replaced with the default "Linux 2.4.22".

I thought ssh might be the problem so I directly edited the motd file through the terminal but I get the same results every time I restart. I had also thought that slack maybe just hadnt written the file to disk from its cache but I've let the computer sit there for 2 weeks+ and it still erases the motd every time I restart.

I checked the file permissions, nothing odd there,
-rw-r--r-- and even went so far as to chmod the file to 777 but still no positive results. It keeps on resetting itself.

Is there something maybe in the boot process that is clearing this file?

I'm a tad new to linux and even my profs at school dont know whats up with it. Any ideas? Thx in advance.
 
Old 02-16-2004, 07:00 PM   #2
pedro_nf
Member
 
Registered: Sep 2003
Location: France
Distribution: RedHat
Posts: 58

Rep: Reputation: 15
Don't know much about Slackware distrib. but it looks like you installed some kind of adminitration/configuration package that loads the initial settings when booting. You'll have use this configuration utility to change settings, or desactivate it and configure by hand...
 
Old 02-16-2004, 07:02 PM   #3
SylvainP
LQ Newbie
 
Registered: Feb 2004
Distribution: Suse, Knoppix, Slackware
Posts: 27

Rep: Reputation: 15
"Is there something maybe in the boot process that is clearing this file?"

Suspecting the boot process then the next step is to go to /etc/rc.d and grep for motd:

--------------------------------------------------------------------------------
/etc/rc.d$ grep motd *
rc.S:# Setup the /etc/motd to reflect the current kernel level:
rc.S:echo "`/bin/uname -sr`." > /etc/motd
--------------------------------------------------------------------------------

Bingo, it's in the file rc.S, just comment out (put a # at the start of the line) the offending line:

#echo "`/bin/uname -sr`." > /etc/motd

and your modif of motd should stick!
 
Old 02-16-2004, 07:18 PM   #4
caphrim007
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Alight! Found it in the rc.S file as SylvainP suggested and commented the line out. Everything is workin like a charm. Thanks a bunch pedro_nf and SylvainP!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/motd skate Linux - Software 5 05-03-2006 08:44 AM
Motd wizex Slackware 6 09-05-2005 08:27 AM
motd iomari Linux - Software 5 04-03-2005 04:43 AM
motd Master Fox Linux - Software 2 08-25-2004 07:40 AM
Is there any MOTD software available besides /etc/motd? csif Linux - Software 1 04-24-2004 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration