diff options
-rw-r--r-- | security/barnyard2/files/barnyard2.sh.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/security/barnyard2/files/barnyard2.sh.in b/security/barnyard2/files/barnyard2.sh.in index 043461583ab9..b51d9f05e933 100644 --- a/security/barnyard2/files/barnyard2.sh.in +++ b/security/barnyard2/files/barnyard2.sh.in @@ -37,13 +37,18 @@ command_args="-c ${barnyard2_conf} -D" load_rc_config $name if [ -n "${barnyard2_rules}" ];then + _1=$1 + rc=0 + if [ $# -gt 1 ];then shift; barnyard2_rules=$*; fi for i in ${barnyard2_rules}; do echo -n "$i:" eval barnyard2_flags=\$barnyard2_${i}_flags eval pidfile=\$barnyard2_${i}_pidfile eval barnyard2_conf=\$barnyard2_${i}_conf command_args="-c $barnyard2_conf -D" - run_rc_command "$1" + run_rc_command "$_1" + if [ $? -ne 0 ];then rc=1 ; fi + unset _pidcmd _rc_restart_done done else run_rc_command "$1" |