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

Bug#203305: /etc/init.d/distributed-net fails to stop dnetc if run from non-interactive shell

On Tue, Jul 29, 2003 at 10:35:34AM +0100, Matthew Exley wrote:
> Package: distributed-net
> Version: 2.9001.478-2
> Severity: minor
> Tags: patch
> /etc/init.d/distributed-net fails to stop the client if run from a
> non-interactive shell, e.g. if run from a cron job (where the client
> is only scheduled to run overnight, for example), then the output of:
> "/etc/init.d/distributed-net stop" will be "not running".
> This appears to be because the test for running command uses
> stop-start-daemon to check, which resides in /sbin which isn't in the
> path for non-interactive shells.
> So, a fix is to add:
> 	PATH=/sbin:$PATH
> ...before the "case" statement in /etc/init.d/distributed-net

I think /sbin should go on the end, to allow a sysadmin to call that
script from a shell with PATH=/usr/local/sbin:... and have tools in
/usr/local/sbin override the system ones. ssh's init script does this:

  export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"


Colin Watson                                  [cjwatson@flatline.org.uk]

Reply to: