From: Robert R. <rob...@am...> - 2008-11-13 15:10:03
|
When using option --deinit the functions do_stop() and do_kill_daemon() are only called, if the daemon is running. This prevents the irritating message 'Daemon not running' for an init/deinit sequence. Signed-off-by: Robert Richter <rob...@am...> --- utils/opcontrol | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/opcontrol b/utils/opcontrol index 6fe0611..c946e34 100644 --- a/utils/opcontrol +++ b/utils/opcontrol @@ -719,8 +719,10 @@ do_options() --deinit) DUMP=yes - STOP=yes - KILL_DAEMON=yes + test ! -f "$LOCK_FILE" || { + STOP=yes + KILL_DAEMON=yes + } DEINIT=yes EXCLUSIVE_ARGC=`expr $EXCLUSIVE_ARGC + 1` EXCLUSIVE_ARGV="$arg" -- 1.6.0.1 |