LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   execute rc.local without reboot of linux server (https://www.linuxquestions.org/questions/slackware-14/execute-rc-local-without-reboot-of-linux-server-467282/)

tooparam 07-24-2006 09:03 PM

execute rc.local without reboot of linux server
 
:scratch:

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'

:eek:

tuxdev 07-24-2006 09:15 PM

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.

jimX86 07-24-2006 09:16 PM

I'm not sure what you're looking for. How about...

/etc/rc.d/rc.local

drkstr 07-25-2006 12:03 AM

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

liquidtenmilion 07-25-2006 01:24 AM

That is infact the answer.

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

It really is THE way to do it.

Alien Bob 07-25-2006 03:57 AM

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

Old_Fogie 07-26-2006 03:23 PM

@Alien Bob

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

I thought in irc language "/ignore"

raska 07-26-2006 04:31 PM

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...

:eek:
with all due respect :D ... 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 :D :D :D

rigelan 07-26-2006 05:07 PM

The only other thing is that you might need to sudo it.

raska 07-26-2006 05:40 PM

Quote:

Originally Posted by rigelan
The only other thing is that you might need to sudo it.

naaaa
run them all as root

liquidtenmilion 07-26-2006 06:42 PM

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.

Matir 07-26-2006 06:46 PM

And the OP has yet to clarify his original question... I am a bit stumped by it as well.

drkstr 07-26-2006 06:53 PM

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

raska 07-26-2006 06:57 PM

I do believe he was joking, in response to my former post.

Quote:

Originally Posted by liquidtenmilion
4777

LOL!!!! :D :D :D
that was hilarious

Matir 07-26-2006 06:58 PM

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


All times are GMT -5. The time now is 05:39 AM.