Bug#203305: /etc/init.d/distributed-net fails to stop dnetc if run from non-interactive shell
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
and a non-intrusive work-around is to change all calls to the script in
cron or at jobs to:
PATH=/sbin:$PATH /etc/init.d/distributed-net [start|stop]
I'd have thought that the first option would be less intrusive for all
debian users (since it doesn't require any special operation from
anyone) but I'm not sure of any security / policy implications.
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux Apu 2.4.21.dsc-u10.apu2.120703 #1 Sun Jul 13 01:06:55 BST 2003 i686
Locale: LANG=en_GB, LC_CTYPE=en_GB (ignored: LC_ALL set)
Versions of packages distributed-net depends on:
ii host 20000331-9 utility for querying DNS servers
ii libc6 2.3.1-17 GNU C Library: Shared libraries an
-- no debconf information
Reply to: