aboutsummaryrefslogtreecommitdiffstats
path: root/net/samba34
diff options
context:
space:
mode:
authoruqs <uqs@FreeBSD.org>2011-01-30 19:19:39 +0800
committeruqs <uqs@FreeBSD.org>2011-01-30 19:19:39 +0800
commit2e7e018ed3b6657d9061ae0363d11fe29c1f7a46 (patch)
tree201617c83fb273191f303868c0a389d48b27c5aa /net/samba34
parent15533a74e888c9e31e2623ffed61905fa9a9d795 (diff)
downloadfreebsd-ports-gnome-2e7e018ed3b6657d9061ae0363d11fe29c1f7a46.tar.gz
freebsd-ports-gnome-2e7e018ed3b6657d9061ae0363d11fe29c1f7a46.tar.zst
freebsd-ports-gnome-2e7e018ed3b6657d9061ae0363d11fe29c1f7a46.zip
Collect the return values of both smbd and nmbd and return with exit status of
either of them if one is failing. PR: ports/151173 Submitted by: uqs Approved by: maintainer timeout (3 months) Feature safe: yes
Diffstat (limited to 'net/samba34')
-rw-r--r--net/samba34/Makefile2
-rw-r--r--net/samba34/files/samba.in9
2 files changed, 9 insertions, 2 deletions
diff --git a/net/samba34/Makefile b/net/samba34/Makefile
index caf83ee9ab87..09dbf7538c95 100644
--- a/net/samba34/Makefile
+++ b/net/samba34/Makefile
@@ -7,7 +7,7 @@
PORTNAME= samba34
PORTVERSION= 3.4.9
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= net
MASTER_SITES= ${MASTER_SITE_SAMBA}
MASTER_SITE_SUBDIR= . old-versions rc pre
diff --git a/net/samba34/files/samba.in b/net/samba34/files/samba.in
index e955b72f576a..cb86f976ea5f 100644
--- a/net/samba34/files/samba.in
+++ b/net/samba34/files/samba.in
@@ -137,7 +137,7 @@ samba_reload_cmd() {
}
samba_cmd() {
- local name rcvar command pidfile samba_daemons
+ local name rcvar command pidfile samba_daemons result _result
# Prevent recursive calling
unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
# Stop processes in the reverse to order
@@ -145,6 +145,7 @@ samba_cmd() {
samba_daemons=$(reverse_list ${samba_daemons})
fi
# Apply to all daemons
+ result=0
for name in ${samba_daemons}; do
rcvar=$(set_rcvar)
command="%%PREFIX%%/sbin/${name}"
@@ -152,8 +153,14 @@ samba_cmd() {
# Daemon should be enabled and running
if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then
run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
+ # Collect return values
+ _result=$?
+ if [ ${_result} != 0 ]; then
+ result=${_result}
+ fi
fi
done
+ return $result
}
run_rc_command "$1"