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

Bug#562506: init scripts should not use set -e

Package: debian-policy
Severity: minor

Currently, Debian Policy makes a general statement that all Bourne shell
scripts should start with set -e and does not (so far as I can see) make
an exception for init scripts.  I've seen several init scripts use set -e,
which is usually a bad idea.  It assumes that the shell function libraries
used for status reporting are "set -e"-clean, which they may not be, and
it causes the init scripts to exit in non-obvious ways and produce lots of
debugging headache.

I think there's already a consensus that set -e is the wrong approach for
init scripts and instead the exit status of key commands should be checked
instead.  I think Policy should reflect that consensus somewhere in the
section on init scripts.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

debian-policy depends on no packages.

debian-policy recommends no packages.

Versions of packages debian-policy suggests:
ii  doc-base                      0.9.5      utilities to manage online documen

-- no debconf information

Reply to: