Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-25-2000, 07:35 PM   #1
LQ Newbie
Registered: Oct 2000
Location: San Jose
Posts: 2

Rep: Reputation: 0

Everything was going so well...I was adding routes at the CLI, but found the need to add these lines into a script. rc.local seemed like the right place, but when I saved/restarted...still no routes. When I went to verify the 'route add...' lines were saved, I found what I didn't expect in the file.

Basically, it's gone. I get the feeling rc.local is a pretty vanilla file, though I can't remember exactly what was there to begin with. Can somone post a sample? I'm using RH 6.2, nothing fancy. (It's actually a FW, and most services are disabled)

Many thanks!

Old 10-25-2000, 10:30 PM   #2
Registered: Jun 2000
Location: SUNY Buffalo
Posts: 79

Rep: Reputation: 15
This is the original rc.local from a virgin RH6.2 install...

# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

if [ -f /etc/redhat-release ]; then
R=$(cat /etc/redhat-release)

arch=$(uname -m)
case "_$arch" in
_a*) a="an";;
_i*) a="an";;

NUMPROC=`egrep -c "^cpu[0-9]+" /proc/stat`
if [ "$NUMPROC" -gt "1" ]; then
SMP="$NUMPROC-processor "
if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then

# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
echo "" > /etc/issue
echo "$R" >> /etc/issue
echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue

cp -f /etc/issue /etc/
echo >> /etc/issue
Old 10-26-2000, 12:00 AM   #3
LQ Newbie
Registered: Oct 2000
Location: San Jose
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs up rc.local

Whew! I was really sweatin' about how I'd attack this one... You probably saved me hours of wasted searching, or a re-install! I never expected a response so quickly...




Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 06:04 AM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 08:11 PM
Regarding rc.local subaruwrx Linux - Newbie 11 10-11-2004 09:04 AM
where's my rc.local TheChicken Linux - Newbie 4 04-05-2004 02:38 PM
Cannot resolve local addresses on local network danielgrenyer Linux - Networking 6 01-14-2004 12:03 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:17 PM.

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