aboutsummaryrefslogtreecommitdiffstats
path: root/main/opensmtpd/smtpd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/opensmtpd/smtpd.initd')
-rw-r--r--main/opensmtpd/smtpd.initd8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/opensmtpd/smtpd.initd b/main/opensmtpd/smtpd.initd
index ae55a7a73db..e72fa4173d3 100644
--- a/main/opensmtpd/smtpd.initd
+++ b/main/opensmtpd/smtpd.initd
@@ -33,9 +33,9 @@ checkconfig() {
ebegin "Checking $name configuration"
# Don't output anything unless something is *not* ok.
- local out; out=$($command -n 2>&1)
- local ret=$?
+ local out rc=0
+ out=$($command -n 2>&1) || rc=$?
+ [ "$rc" -eq 0 ] || printf '%s\n' "$out" >&2
- [ "$ret" -eq 0 ] || printf '%s\n' "$out" >&2
- eend $?
+ eend $rc
}