From a4486aa055aa21423001d3c9cbaa5a64bafeb319 Mon Sep 17 00:00:00 2001 From: Kurt J. Bosch Date: Wed, 24 Feb 2010 22:20:26 +0100 Subject: [PATCH 4/4] Provide daemon script exitcodes for post_daemon hooks --- functions | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/functions b/functions index 1a798a9..b1dc284 100644 --- a/functions +++ b/functions @@ -200,7 +200,9 @@ start_daemon() { local daemon=$1 run_hook pre_daemon_start /etc/rc.d/$1 start + local daemonret=$? run_hook post_daemon_start + return $daemonret } start_daemon_bkgd() { @@ -210,6 +212,7 @@ start_daemon_bkgd() { ( run_hook pre_daemon_bkgd /etc/rc.d/$1 start + local daemonret=$? run_hook post_daemon_bkgd ) &>/dev/null & } @@ -218,7 +221,9 @@ stop_daemon() { local daemon=$1 run_hook pre_daemon_stop /etc/rc.d/$1 stop + local daemonret=$? run_hook post_daemon_stop + return $daemonret } # Status functions -- 1.6.6.1