Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following script (what it does exactly is not important):

#!/bin/sh -e
# Provides:          watchdog_early
# Required-Start:    udev
# Required-Stop:     
# Default-Start:     S
# Default-Stop:
# X-Interactive:     true
# Short-Description: Start watchdog early.

# Do stuff here... 

I insert it into the S runlevel by invoking:

insserv watchdog_early

The aproriate link is created in /etc/rcS.d:

S04watchdog_early -> ../init.d/watchdog_early

and /etc/init.d/watchdog_early is executable (has mode 755).

Despite all this, it is NOT being run at boot. Why?

share|improve this question
Are you sure it's not failing for some reason rather than not running? Check your logs add some debug messages etc ? – Iain Jun 21 '12 at 20:50
No, it's not failing. I added a bunch of debug messages. In a desperate move I even put "reboot -f" there so I know it runs when the device reboots during bootup... nothing seem to work. – MasterM Jun 21 '12 at 20:54

Post the full script.

Your shebang line, "#!/bin/sh -e" will exit on error. If the error condition is met before your debug output / lines run, you won't see them.

Alternately, remove the '-e' option and retry your script.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.