Startup Scripts
Matthew Carpenter
matt
Fri Feb 25 12:25:38 PST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Shawn Tayler wrote:
| 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.
Try temporarily commenting out the conditional block and check if it runs:
#if [ -x /etc/rc.d/rc.local ]; then
~ . /etc/rc.d/rc.local
#fi
- --
Matthew Carpenter
matt at eisgr.com http://www.eisgr.com/
Enterprise Information Systems
* Network Server Appliances
* Security Consulting, Incident Handling & Forensics
* Network Consulting, Integration & Support
* Web Integration and E-Business
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCHya/so9lqh4MragRAthIAKC92KbtSq/MPGn4LQ1MJZRzzW5r4QCfT0Qn
lsUI9fs4zwhsxnS379ygBaU=
=Xfwz
-----END PGP SIGNATURE-----
More information about the Linux-users
mailing list