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 07-24-2006, 09:03 PM   #1
tooparam
Member
 
Registered: Nov 2005
Location: India
Distribution: Slackware
Posts: 51

Rep: Reputation: 15
execute rc.local without reboot of linux server




Hi there

I've added few lines to my rc.local file.
How can I execute rc.local without reboot of my Slackware 10.2 linux server

Please don't reply if your answer is: It can be executed as './rc.local'


Last edited by tooparam; 07-24-2006 at 09:07 PM.
 
Old 07-24-2006, 09:15 PM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Really, that's how you do it. If there is other stuff in there that shouldn't be done twice, just execute those lines you added directly into a shell.
 
Old 07-24-2006, 09:16 PM   #3
jimX86
Member
 
Registered: Mar 2006
Distribution: Slackware64 -current
Posts: 268
Blog Entries: 1

Rep: Reputation: 79
I'm not sure what you're looking for. How about...

/etc/rc.d/rc.local
 
Old 07-25-2006, 12:03 AM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Quote:
I've added few lines to my rc.local file.
How can I execute rc.local without reboot of my Slackware 10.2 linux server

Please don't reply if your answer is: It can be executed as './rc.local'
lol. "I have a question, but please don't respond with the answer."

What are you looking for, other ways to do it? you can choose one of many ways to run a shell script. 'sh /etc/rc.d/rc.local' '/etc/rc.d/rc.local' or if you are in the same directory, './rc.local'.

regards,
...drkstr

Last edited by drkstr; 07-25-2006 at 01:27 AM.
 
Old 07-25-2006, 01:24 AM   #5
liquidtenmilion
Member
 
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606

Rep: Reputation: 32
That is infact the answer.

cd /etc/rc.d
./rc.local

It really is THE way to do it.
 
Old 07-25-2006, 03:57 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by tooparam
Please don't reply if your answer is: It can be executed as './rc.local'
Ummm... don't know what to think of such a post... however, did you ever try just running the commands you added to your rc.local file so as to prevent the already started programs starting twice?

However,
if your question was supposed to read:
Code:
how can I verify the correctness of the syntax of rc.local now that I added a few lines, but I don't want to risk running rc.local for real
i.e. just do a syntax check, then add this line to rc.local (just for the syntax test!) as the first uncommented line:
Code:
set -n
Now, running
Code:
/etc/rc.d/rc.local
will not execute any command in rc.local but rather do a syntax check for you. If all remains silent, then your rc.local has correct syntax.

Make sure to delete the line "set -n" afterwards or your computer will not recover fully after reboot...!

Eric
 
2 members found this post helpful.
Old 07-26-2006, 03:23 PM   #7
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Rep: Reputation: 63
@Alien Bob

"Ummm... don't know what to think of such a post... "

I thought in irc language "/ignore"
 
Old 07-26-2006, 04:31 PM   #8
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by Alien Bob
Code:
set -n
...will not execute any command in rc.local but rather do a syntax check for you...

with all due respect ... man you are a biatch!
That's a neat and useful trick that I didn't know. Thanks!

Quote:
Originally Posted by Old_Fogie
...I thought in irc language "/ignore"
LOL
 
Old 07-26-2006, 05:07 PM   #9
rigelan
Member
 
Registered: Jul 2005
Location: Iowa
Distribution: Slackware
Posts: 180

Rep: Reputation: 19
The only other thing is that you might need to sudo it.
 
Old 07-26-2006, 05:40 PM   #10
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by rigelan
The only other thing is that you might need to sudo it.
naaaa
run them all as root
 
Old 07-26-2006, 06:42 PM   #11
liquidtenmilion
Member
 
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606

Rep: Reputation: 32
Just chmod -R 4777 / and then you don't have to worry about running commands as root anymore...



EDIT: Don't really do this, it'd be worse for security than running windows.

Last edited by liquidtenmilion; 07-26-2006 at 07:17 PM.
 
Old 07-26-2006, 06:46 PM   #12
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
And the OP has yet to clarify his original question... I am a bit stumped by it as well.
 
Old 07-26-2006, 06:53 PM   #13
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Quote:
Just chmod -R 4777 /. >_>
I really hope you were kidding. Becarfull posting stuff like this, you never know what helpless newbie will stuble across and actually try to do this.

...drkstr
 
Old 07-26-2006, 06:57 PM   #14
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
I do believe he was joking, in response to my former post.

Quote:
Originally Posted by liquidtenmilion
4777
LOL!!!!
that was hilarious
 
Old 07-26-2006, 06:58 PM   #15
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Yeah, I'd appreciate a note indicating that should not be done on a production system due to the security implications.
 
  


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
rc.local won't execute on Suse 10.0 advwebsys SUSE / openSUSE 5 01-26-2006 05:45 PM
is there a way to make a local linux server the time stamp server for win2k? Lleb_KCir Linux - General 2 09-19-2005 07:05 PM
How to make a command execute on it every reboot? peterguo Linux - Software 5 11-04-2004 07:23 PM
how to execute my program when any user logs off my linux server ? rags2k Programming 8 08-17-2004 02:33 PM
Is it possible to make a Linux server execute a program on a WinXP system? Cichlasoma Linux - General 4 04-23-2004 06:00 AM

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

All times are GMT -5. The time now is 11:31 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
Open Source Consulting | Domain Registration