Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 got a simple script called hwtestinit which I installed using

update-rc.d hwtestinit defaults

On the surface, as far as I can inspect, all seems fine , I mean, the following files, all exists, etc.

/etc/rc0.d/K20hwtestinit -> ../init.d/hwtestinit
/etc/rc1.d/K20hwtestinit -> ../init.d/hwtestinit
/etc/rc6.d/K20hwtestinit -> ../init.d/hwtestinit
/etc/rc2.d/S20hwtestinit -> ../init.d/hwtestinit
/etc/rc3.d/S20hwtestinit -> ../init.d/hwtestinit
/etc/rc4.d/S20hwtestinit -> ../init.d/hwtestinit
/etc/rc5.d/S20hwtestinit -> ../init.d/hwtestinit

When I run the script manually, all seems fine, that is, issuing the command

/etc/init.d/hwtestinit start

Yields to the desired results.However, system is not executing the on startup, and I have no idea why. I could not find any mention of it at logs files found under /var/log and wonder ins which other log file I should look at.

The script is dumped below

#! /bin/sh

case "$1" in
    smarteventd -c /etc/sctest.ini
    lcdaemon --lcdtest    
    smarteventd --stop
    lcdaemon --stop
    echo "Usage: /etc/init.d/hwtestinit {start|stop}"
    exit 1

exit 0
share|improve this question
Why do you expect to find something in log files? Nothing is logged if not explicitly requested. Put some echo "msg" >>/var/log/mylog around to see what happens. – enzotib Jul 12 '11 at 9:14
@enzotib I would expect system V to log if it fails or skip a task, wouldn't you? – Tzury Bar Yochay Jul 13 '11 at 2:24
Maybe mark the question as answered since you've switched to using upstart? – SpamapS Jul 13 '11 at 11:51
@SpamapS SO does not let one mark self answer before 24 hours passed – Tzury Bar Yochay Jul 14 '11 at 11:41

The output of sysv init scripts should end up in /var/log/boot.log. You would want to look in there for any output.

share|improve this answer
up vote 1 down vote accepted

I switched to Upstart instead of system V.

Things work fine now. Quite strange though.

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.