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

Re: Bug#339955: sysv-rc: /etc/init.d/*.sh should be sourced in runlevel S



On Mon, Nov 21, 2005 at 09:55:22AM +0100, Thomas Hood wrote:
>Brendan O'Dea wrote:
>> there are quite a few instances in /etc/init.d/*.sh scripts where "exit" is
>> called.
>
>All the exit commands are either (1) at the end of usage exception sections,
>or (2) preceded by colons ':'.  Testing suggests that a ": exit 0" does the
>same as ":", namely, nothing.

Yes, ":" is a no-op, which returns true.  Sometimes used for side-effects:

  : ${foo:=bar} # set foo=bar if not set

Not all instances are harmless.  Take /etc/init.d/hwclock.sh for example
(util-linux):

  [ ! -x /sbin/hwclock ] && exit 0

"chmod -x /sbin/hwclock" should not stop my system from booting.

--bod



Reply to: