LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-13-2014, 05:35 PM   #1
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Rep: Reputation: 16
Question Add a line correctly to /etc/rc.local - (Centos 6.5 64Bit)


Hello

I want to add a command to startup after reboot in my Centos 6.5 64Bit server:

I will edit:
Code:
/etc/rc.local
and add this:

Code:
ip route change default via 4.3.2.1 dev eth0 initcwnd 10 initrwnd 10
Or i must add it in another way or format like:

Code:
ip route change default via 4.3.2.1 dev eth0 initcwnd 10 initrwnd 10 &

Thank you
 
Old 05-13-2014, 05:40 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
The ampersand causes the command to run in the background. If there's a chance the command might hang or never return, then you would want the ampersand there so the command doesn't lock up the rc.local script and prevent your system from booting. You shouldn't have to worry about that with ip though, so it's optional in your example.
 
  


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
My system did not appear to resume correctly(CentOS 5-2) madani Linux - Newbie 1 11-09-2009 05:17 PM
CentOS: add SAN directory to local file system RobertSubnet Linux - Newbie 4 06-12-2009 01:32 PM
Dual IP's on Ubuntu 8.10 but route add does not work correctly wvw Linux - Networking 6 02-09-2009 10:43 PM
how can i add a local Folder on local Hard Disk as Yum Repository ?? vahid_p Fedora 4 02-22-2007 11:43 AM
RHEL 4 64Bit an HP BL 25p, the clock don't work correctly ZaRa Red Hat 0 01-17-2006 06:38 AM

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

All times are GMT -5. The time now is 02:12 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration