LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
Unhappy


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!

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

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

#!/bin/sh
#
# 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)
a="a"
case "_$arch" in
_a*) a="an";;
_i*) a="an";;
esac

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

# 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/issue.net
echo >> /etc/issue
fi
 
Old 10-25-2000, 11:00 PM   #3
jbrown
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...

THANK YOU!

JB
 
  


Reply


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 05:04 AM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 07:11 PM
Regarding rc.local subaruwrx Linux - Newbie 11 10-11-2004 08:04 AM
where's my rc.local TheChicken Linux - Newbie 4 04-05-2004 01:38 PM
Cannot resolve local addresses on local network danielgrenyer Linux - Networking 6 01-14-2004 11:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:22 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