Startup Scripts

Shawn Tayler stayler
Thu Feb 24 08:36:19 PST 2005


On Thu, 24 Feb 2005 07:03:11 -0500 David Bandel <david.bandel at gmail.com>
exclaimed:

> On Wed, 23 Feb 2005 21:18:41 -0800, Shawn Tayler
> <stayler at xmtservices.net> wrote:
> > Hi Guys,
> > 
> > I realize this may be a Slackware only issue but it seems general
> > enough in nature to post here.
> > 
> > I am having a problem with rc.local not being run on system startup. 
> > Its is called as the last thing in the rc.M script like this:
> > 
> > if [ -x /etc/rc.d/rc.local ]; then
> >  . /etc/rc.d/rc.local
> > fi
> > 
> > seems straight forward enough.  rc.local is set chmod +x so I can't
> > figure out why its not running.  I am sure its something simple, but
> > the 10 percent rule has me on this.
> > 
> 
> couple of thoughts:
> 1. will the script run from a command line (can root run this script?)
> 2. if ! 1, check your shebang line
> 3. if 1, check your rc.local environment.  Ensure you've either
> full-pathed your commands or have a PATH= environment variable at the
> top that takes care of all your command invocations in the script.

Hey David!

Answers:

1.  Yes, runs great from a command prompt, as root.

2. I am not sure what you mean by this?  The rc.M script is full of
statements, like the one mentioned.  I even added one myself to call
another script, starts up PostgreSQL.  The if ! 1, I think means if not 1? 
Is that right?  The shebang thing just conjours images of a pathetic
American Idol entrant, who's 15min's should've ran out years ago! 8-)

 3. There arev only 2 lines in the script, outside of a bunch of comments.
The first one is an echo line, "echo "rc.local has run". It doesn't.


More information about the Linux-users mailing list