[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Checking init.d script for policy compliance.

On Fri, Apr 04, 2003 at 02:20:13PM -0600, Steve Greenland wrote:
> On 02-Apr-03, 08:55 (CST), Bill Allombert <allomber@math.u-bordeaux.fr> wrote: 
> > Wrong restart behavior when not running:
> > atd cron klogd syslogd *ntpd
> Uh, sorry, what? I don't know about the others, but both cron and atd do
> exactly the right thing: start the daemon. If you want the state to not
> change, you should use invoke-rc.d. Please read Debian Policy 10.3.2.

Probably you missed the disclaimer. Anyway I was tricked to believe that

stop)	echo -n "Stopping periodic command scheduler: cron"
        start-stop-daemon --stop --quiet --exec /usr/sbin/cron
        echo "."
restart) echo -n "Restarting periodic command scheduler: cron"
        start-stop-daemon --stop --quiet --exec /usr/sbin/cron
        start-stop-daemon --start --quiet --exec /usr/sbin/cron
        echo "."
will make restart fail if cron is not running because this script do not
set -e as expected. The same for the others. Sorry about the confusion.

Bill. <ballombe@debian.org>
who really need to learn how error handling is done in shell scripts.

Reply to: