aboutsummaryrefslogtreecommitdiff
path: root/net/quagga
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2008-07-02 12:27:22 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2008-07-02 12:27:22 +0000
commit201c2fdb4cea246f08fa7e13529e75ecf0266a20 (patch)
tree54626ee469c97469d3ee61a8305db57244dbd070 /net/quagga
parent85bbd85f432891c67d3eadfcfd7526a179a18ac1 (diff)
downloadports-201c2fdb4cea246f08fa7e13529e75ecf0266a20.tar.gz
ports-201c2fdb4cea246f08fa7e13529e75ecf0266a20.zip
Notes
Diffstat (limited to 'net/quagga')
-rw-r--r--net/quagga/Makefile1
-rw-r--r--net/quagga/files/quagga.sh.in44
2 files changed, 28 insertions, 17 deletions
diff --git a/net/quagga/Makefile b/net/quagga/Makefile
index 0f1ebf00f735..d2460436c988 100644
--- a/net/quagga/Makefile
+++ b/net/quagga/Makefile
@@ -7,6 +7,7 @@
PORTNAME= quagga
PORTVERSION= 0.99.10
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://quagga.net/download/ \
http://www.ru.quagga.net/download/ \
diff --git a/net/quagga/files/quagga.sh.in b/net/quagga/files/quagga.sh.in
index 62bfece8272e..0f9d6d1cc8b5 100644
--- a/net/quagga/files/quagga.sh.in
+++ b/net/quagga/files/quagga.sh.in
@@ -37,6 +37,25 @@ stop_postcmd()
rm -f $pidfile
}
+do_cmd()
+{
+ for daemon in ${quagga_daemons}; do
+ command=%%PREFIX%%/sbin/${daemon}
+ required_files=%%SYSCONF_DIR%%/${daemon}.conf
+ pidfile=%%LOCALSTATE_DIR%%/${daemon}.pid
+ if [ ${quagga_cmd} = "start" -a ! -f ${required_files} ]; then
+ continue
+ fi
+ if [ ${quagga_cmd} = "stop" -a -z $(check_process ${command}) ]; then
+ continue
+ fi
+ eval flags=\$\{${daemon}_flags:-\"${quagga_flags}\"\}
+ name=${daemon}
+ run_rc_command "$1"
+ _rc_restart_done=false
+ done
+}
+
# set defaults
load_rc_config $name
@@ -63,28 +82,19 @@ case "${quagga_cmd}" in
if [ ! -z ${quagga_extralibs_path} ]; then
/sbin/ldconfig -m ${quagga_extralibs_path}
fi
+ do_cmd "start"
;;
- stop|restart)
+ stop)
quagga_daemons=$(reverse_list ${quagga_daemons})
+ do_cmd "stop"
;;
+ restart)
+ quagga_daemons=$(reverse_list ${quagga_daemons})
+ do_cmd "stop"
+ quagga_daemons=$(reverse_list ${quagga_daemons})
+ do_cmd "start"
esac
-for daemon in ${quagga_daemons}; do
- command=%%PREFIX%%/sbin/${daemon}
- required_files=%%SYSCONF_DIR%%/${daemon}.conf
- pidfile=%%LOCALSTATE_DIR%%/${daemon}.pid
- if [ ${quagga_cmd} = "start" -a ! -f ${required_files} ]; then
- continue
- fi
- if [ ${quagga_cmd} = "stop" -a -z $(check_process ${command}) ]; then
- continue
- fi
- eval flags=\$\{${daemon}_flags:-\"${quagga_flags}\"\}
- name="${daemon}"
- run_rc_command "$1"
- _rc_restart_done=false
-done
-
if [ "${quagga_delay}" != "0" ]; then
echo "Sleeping ${quagga_delay} seconds to obtain dynamic routing information..."
sleep ${quagga_delay}