aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-07-27 04:12:57 +0800
committermarcus <marcus@FreeBSD.org>2004-07-27 04:12:57 +0800
commit29a232ca30882b7094bf4f69dc81f91b3876cca3 (patch)
treeb73323abc6750e0afbcc03958f40e92eda196c2a /net
parentebbc04cc8f7fec312aa392864841be1cb9e4a589 (diff)
downloadfreebsd-ports-gnome-29a232ca30882b7094bf4f69dc81f91b3876cca3.tar.gz
freebsd-ports-gnome-29a232ca30882b7094bf4f69dc81f91b3876cca3.tar.zst
freebsd-ports-gnome-29a232ca30882b7094bf4f69dc81f91b3876cca3.zip
Use a safer way of initializing default rc.d variables.
Submitted by: mtm
Diffstat (limited to 'net')
-rw-r--r--net/netatalk-devel/files/netatalk.sh16
-rw-r--r--net/openslp/files/slpd.in6
-rw-r--r--net/openslp/files/slpd.sh.sample6
3 files changed, 14 insertions, 14 deletions
diff --git a/net/netatalk-devel/files/netatalk.sh b/net/netatalk-devel/files/netatalk.sh
index aea45751cd73..181a9ff72f28 100644
--- a/net/netatalk-devel/files/netatalk.sh
+++ b/net/netatalk-devel/files/netatalk.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/net/netatalk-devel/files/Attic/netatalk.sh,v 1.4 2004-07-21 19:56:30 marcus Exp $
+# $FreeBSD: /tmp/pcvs/ports/net/netatalk-devel/files/Attic/netatalk.sh,v 1.5 2004-07-26 20:12:57 marcus Exp $
#
# PROVIDE: netatalk
# REQUIRE: DAEMON
@@ -11,6 +11,13 @@
# other processes.
#
+netatalk_enable=${netatalk_enable-"NO"}
+atalkd_enable=${atalkd_enable-"NO"}
+papd_enable=${papd_enable-"NO"}
+cnid_metad_enable=${cnid_metad_enable-"NO"}
+afpd_enable=${afpd_enable-"NO"}
+timelord_enable=${timelord_enable-"NO"}
+
. %%RC_SUBR%%
name=netatalk
@@ -42,12 +49,5 @@ netatalk_stop() {
checkyesno atalkd_enable && killall atalkd
}
-[ -z "$netatalk_enable" ] && netatalk_enable="NO"
-[ -z "$atalkd_enable" ] && atalkd_enable="NO"
-[ -z "$papd_enable" ] && papd_enable="NO"
-[ -z "$cnid_metad_enable" ] && cnid_metad_enable="NO"
-[ -z "$afpd_enable" ] && afpd_enable="NO"
-[ -z "$timelord_enable" ] && timelord_enable="NO"
-
load_rc_config ${name}
run_rc_command "$1"
diff --git a/net/openslp/files/slpd.in b/net/openslp/files/slpd.in
index 005d18921a5d..4fe3d0826913 100644
--- a/net/openslp/files/slpd.in
+++ b/net/openslp/files/slpd.in
@@ -11,6 +11,9 @@
# slpd_enable="YES"
#
+slpd_enable=${slpd_enable-"NO"}
+slpd_flags=${slpd_flags-"-p /var/run/slpd.pid"}
+
. %%RC_SUBR%%
name=slpd
@@ -19,8 +22,5 @@ rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/slpd
pidfile="/var/run/${name}.pid"
-[ -z "$slpd_enable" ] && slpd_enable="NO"
-[ -z "$slpd_flags" ] && slpd_flags="-p /var/run/slpd.pid"
-
load_rc_config ${name}
run_rc_command "$1"
diff --git a/net/openslp/files/slpd.sh.sample b/net/openslp/files/slpd.sh.sample
index 005d18921a5d..4fe3d0826913 100644
--- a/net/openslp/files/slpd.sh.sample
+++ b/net/openslp/files/slpd.sh.sample
@@ -11,6 +11,9 @@
# slpd_enable="YES"
#
+slpd_enable=${slpd_enable-"NO"}
+slpd_flags=${slpd_flags-"-p /var/run/slpd.pid"}
+
. %%RC_SUBR%%
name=slpd
@@ -19,8 +22,5 @@ rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/slpd
pidfile="/var/run/${name}.pid"
-[ -z "$slpd_enable" ] && slpd_enable="NO"
-[ -z "$slpd_flags" ] && slpd_flags="-p /var/run/slpd.pid"
-
load_rc_config ${name}
run_rc_command "$1"