diff options
author | johans <johans@FreeBSD.org> | 2006-09-21 17:27:14 +0800 |
---|---|---|
committer | johans <johans@FreeBSD.org> | 2006-09-21 17:27:14 +0800 |
commit | 85abdf311b9e4a38d992fe3bce9bce59d197b710 (patch) | |
tree | 79d35cdd555799f154fbb01ba61082d11c90eb95 /net-mgmt | |
parent | e457a5ad1db397e2ee92dc564fe041db538a7536 (diff) | |
download | freebsd-ports-gnome-85abdf311b9e4a38d992fe3bce9bce59d197b710.tar.gz freebsd-ports-gnome-85abdf311b9e4a38d992fe3bce9bce59d197b710.tar.zst freebsd-ports-gnome-85abdf311b9e4a38d992fe3bce9bce59d197b710.zip |
- Fix rcNG script (handle restart, allow $arpwatch_dir setting)
PR: ports/102600
Submitted by: Eugene Grosbein
Approved by: Thomas Abthorpe (maintainer)
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/arpwatch/files/arpwatch.sh.in | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net-mgmt/arpwatch/files/arpwatch.sh.in b/net-mgmt/arpwatch/files/arpwatch.sh.in index 5736a1ee1e0b..908737fb2406 100644 --- a/net-mgmt/arpwatch/files/arpwatch.sh.in +++ b/net-mgmt/arpwatch/files/arpwatch.sh.in @@ -11,7 +11,7 @@ #arpwatch_enable="YES" # arpwatch_enable=${arpwatch_enable:-"NO"} -arpwatch_dir="%%PREFIX%%/arpwatch/" +arpwatch_dir=${arpwatch_dir:-"%%PREFIX%%/arpwatch/"} . %%RC_SUBR%% @@ -62,15 +62,17 @@ case ${arpwatch_interfaces} in ;; *) - if [ "$1" = "start" -o "$1" = "faststart" ]; then + case "$1" in + *start) for interface in ${arpwatch_interfaces}; do eval options=\$arpwatch_${interface}_options command_args="-i ${interface} ${options} -f arp.${interface}.dat" - pidfile="/var/run/arpwatch-${interface}.pid" run_rc_command "$1" done - else + ;; + *) run_rc_command "$1" - fi + ;; + esac ;; esac |