Unix Technical Forum

rc.local is not executed (Slackware 9.1)

This is a discussion on rc.local is not executed (Slackware 9.1) within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi there! When I start Slackware, for some reason /etc/rc.d/rc.local is ignored, although it is executable. When I run ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 08:29 AM
Lars Behrens
 
Posts: n/a
Default rc.local is not executed (Slackware 9.1)

Hi there!

When I start Slackware, for some reason /etc/rc.d/rc.local is ignored,
although it is executable. When I run it manually after boot, then it
is executed. Any idea what could be the reason?

Some info:

************************************************** ****************
bash-2.05b# ls -l /etc/rc.d/rc.local
-rwxr-xr-x 1 root root 251 2004-02-19 02:07 /etc/rc.d/rc.local
************************************************** ****************

************************************************** ****************
bash-2.05b# less /etc/rc.d/rc.local
#!/bin/bash
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local setup commands in here:
/sbin/sysctl -p

## Deutsches Keyboard
/usr/bin/loadkeys de-latin1-nodeadkeys
************************************************** ****************

Thanks for tips!

Cheerz Lars
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 08:29 AM
David
 
Posts: n/a
Default Re: rc.local is not executed (Slackware 9.1)

Lars Behrens wrote:
> Hi there!
>
> When I start Slackware, for some reason /etc/rc.d/rc.local is ignored,
> although it is executable. When I run it manually after boot, then it
> is executed. Any idea what could be the reason?


rc.local is called from /etc/rc.d/rc.M it is the very last section.

# Start the local setup procedure.
if [ -x /etc/rc.d/rc.local ]; then
. /etc/rc.d/rc.local
fi

--
Confucius: He who play in root, eventually kill tree.
Registered with The Linux Counter. http://counter.li.org/
Slackware 9.1.0 Kernel 2.4.24 SMP i686 (GCC) 3.3.3
Uptime: 44 days, 7:47, 3 users, load average: 0.20, 0.19, 0.2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 08:29 AM
Steve Youngs
 
Posts: n/a
Default Re: rc.local is not executed (Slackware 9.1)

* Lars Behrens <Spam.Buster@web.de> writes:

> When I start Slackware, for some reason /etc/rc.d/rc.local is ignored,
> although it is executable. When I run it manually after boot, then it
> is executed. Any idea what could be the reason?


Check /etc/rc.d/rc.M. Right at the bottom there should be something
like...

if [ -x /etc/rc.d/rc.local ]; then
. /etc/rc.d/rc.local
fi


--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| Ashes to ashes, dust to dust. |
| The proof of the pudding, is under the crust. |
|------------------------------<sryoungs@bigpond.net.au>---|
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 08:29 AM
Claudiu Cismaru
 
Posts: n/a
Default Re: rc.local is not executed (Slackware 9.1)

> ************************************************** ****************
> bash-2.05b# less /etc/rc.d/rc.local
> #!/bin/bash
> #
> # /etc/rc.d/rc.local:**Local*system*initialization*script.
> #
> # Put any local setup commands in here:
> /sbin/sysctl -p
>
> [...]
>


Have you modified other scripts in /etc/rc.d?

If in rc.M it's all Ok (see the posts before mine), then try to see if
you have errors or exit commands in other scripts, not only rc.local.

You can see this on console at boot time.

Or give us a clue with "cat /dev/vcs1"... after de boot time, and not
logged in on tty1.

--
Claudiu Cismaru

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 08:30 AM
Franz M. Sauerzopf
 
Posts: n/a
Default Re: rc.local is not executed (Slackware 9.1)

In <c114ff$1d1bf7$1@ID-95936.news.uni-berlin.de>, Lars Behrens wrote:

> Hi there!
>
> When I start Slackware, for some reason /etc/rc.d/rc.local is ignored,
> although it is executable. When I run it manually after boot, then it
> is executed. Any idea what could be the reason?
>


Maybe you upgraded something and the *.new files in /etc/rc.d mess up the
course of action... I had this problem once.

Good luck

Franz

PS: /usr/bin/loadkeys de-latin1-nodeadkeys.map is supposed to be in
/etc/rc.d/rc.keymap.


--
Franz M. Sauerzopf
Atominstitut, TU Wien

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 08:30 AM
Eef Hartman
 
Posts: n/a
Default Re: rc.local is not executed (Slackware 9.1)

Lars Behrens <Spam.Buster@web.de> wrote:
> When I start Slackware, for some reason /etc/rc.d/rc.local is ignored,
> although it is executable. When I run it manually after boot, then it
> is executed. Any idea what could be the reason?


rc.local should be, as other already told you, be the last script
executed by rc.M. But it executes OTHER scripts first, and as these
are NOT run in sub-shells, any script that executes a "exit", or
"return", will terminate the whole execution of rc.M, so anything beyond
THAT script will not be run anymore.

So look at what else the rc.M is executing, and how far it comes.
Putting some echo's in the rc.M (to a file or so) will show you how
far it comes and so help localize the problem.
--
************************************************** ******************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-19-2008, 08:30 AM
Lars Behrens
 
Posts: n/a
Default Re: rc.local is not executed (Slackware 9.1)

Eef Hartman wrote:

> rc.local should be, as other already told you, be the last script
> executed by rc.M. But it executes OTHER scripts first, and as these
> are NOT run in sub-shells, any script that executes a "exit", or
> "return", will terminate the whole execution of rc.M, so anything
> beyond THAT script will not be run anymore.
>
> So look at what else the rc.M is executing, and how far it comes.
> Putting some echo's in the rc.M (to a file or so) will show you how
> far it comes and so help localize the problem.


Thanks, your tip helped! There was a wrong call of Alsa in rc.M
( "/etc/rc.d/rc.alsa" instead of "/etc/rc.d/rc.alsa start") so the
Script exited.

Thank you and the others for the support!

Cheerz Lars

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-19-2008, 08:31 AM
Lars Behrens
 
Posts: n/a
Default Re: rc.local is not executed (Slackware 9.1)

Franz M. Sauerzopf wrote:

> PS: /usr/bin/loadkeys de-latin1-nodeadkeys.map is supposed to be in
> /etc/rc.d/rc.keymap.


I know, just put it there for testing...

Thanks!

Cheerz Lars

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:25 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com