Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 07-25-2012, 06:39 PM   #31
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 258

Rep: Reputation: 41

I really hope that the OP wasn't newish to Linux, 'cos you lot just sent him running back to Windows.
Old 07-25-2012, 11:02 PM   #32
Registered: Dec 2005
Location: Philippines
Distribution: Slackware
Posts: 601

Rep: Reputation: Disabled
Originally Posted by tooparam View Post

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'

Let me try, I am guessing that you are looking to execute those added lines with out having to reboot or run rc.local

Since you did not give anything with work with, I will make make my own example.

I like to keep my rc.local simple. Each section that does something has only three lines of code. Here is an excerpt from my rc.local to start my UPS daemon. In other words rc.local is used to start another script to perform a specific function.
# Start the apcupdd daemon.
if [ -x /etc/rc.d/rc.apcupsd ]; then
  /etc/rc.d/rc.apcupsd start
Lets say you added a few lines to rc.local to turn on Num Lock. Useful if you boot runlevel 3 as I do.
# Turn on Num Lock
for tty in $CLITTY; do
  /usr/bin/setleds -D +num < $tty
Now there is nothing wrong with adding those lines to rc.local. It just not how I like to do things. I created a rc.numlock script to actually do the task of turning on Num Lock.
# /etc/rc.d/rc.numlock
# Turn on Num Lock

# Turn on Num Lock 
numlock_on() {
  if [ -x /usr/bin/setleds ]; then
    echo "Turning on Num Lock"
    for tty in $CLITTY; do
      /usr/bin/setleds -D +num < $tty

case "$1" in
  echo "usage $0 on"
Here is an excerpt from from my rc.local file showing the lines of code to start the rc.numlock script.
# Start the apcupdd daemon.
if [ -x /etc/rc.d/rc.apcupsd ]; then
  /etc/rc.d/rc.apcupsd start

# Turn on Num Lock
if [ -x /etc/rc.d/rc.numlock ]; then
  /etc/rc.d/rc.numlock on 
You can now run those few added lines without rebooting or running ./rc.local, simple type ./rc.numlock on.

Last edited by chrisretusn; 07-25-2012 at 11:05 PM.


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
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 > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:16 AM.

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