On Fri, 23 Oct 2009 16:03:09 -0500
John Hasler <[email protected]> wrote:

> > I don't recall seeing this problem before, and I'm not sure what's
> > changed, but now, whenever I (re)start chrony via its initscript, it
> > reports that '/usr/sbin/chronyd failed to (re)start'.
> 
> I cannot reproduce this.  Please trace the script and send the output.

[Added "set -x" to the beginning of the script:]

~# /etc/init.d/chrony restart
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
+ DAEMON=/usr/sbin/chronyd
+ FLAGS=defaults
+ NAME=chronyd
+ DESC=time daemon
+ test -f /usr/sbin/chronyd
+ echo -n Restarting time daemon: 
Restarting time daemon: + start-stop-daemon --stop --quiet --exec 
/usr/sbin/chronyd
+ sleep 1
+ start-stop-daemon --start --quiet --exec /usr/sbin/chronyd -- -r
+ /bin/pidof /usr/sbin/chronyd
+ echo /usr/sbin/chronyd failed to restart.
/usr/sbin/chronyd failed to restart.
+ rm -f /var/run/chrony-ppp-up
+ exit 1

~# /bin/pidof /usr/sbin/chronyd
17648

> > It actually does start fine, and the pidof call returns the pid, but
> > AFAICT, the problem is that pidof / killall5 *outputs* the pid(s), but
> > the return value is actually 0 when it successfully locates at least
> > one process, and the initscript checks the return value, not the
> > output.
> 
> In a shell script a return value of 0 means success and tests as true.

/*blushes*

As I said, a script novice.  I actually knew that once, but I usually
program in perl ...

Celejar
-- 
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator




-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to