diff options
-rw-r--r-- | packages/quagga/quagga.sh | 75 | ||||
-rw-r--r-- | packages/quagga/quagga.xml | 18 | ||||
-rw-r--r-- | pkg_config.xml | 24 |
3 files changed, 105 insertions, 12 deletions
diff --git a/packages/quagga/quagga.sh b/packages/quagga/quagga.sh new file mode 100644 index 00000000..e20dd15b --- /dev/null +++ b/packages/quagga/quagga.sh @@ -0,0 +1,75 @@ +#!/bin/sh +# +# Quagga.sh retrofitted for pfSense +# part of the pfSense quagga project +# +# You may also wish to use the following variables to fine-tune startup: +# quagga_flags="-d" +# quagga_daemons="zebra ripd ripngd ospfd ospf6d bgpd isisd" +# Per daemon tuning may be done with daemon_name_flags +# zebra_flags="-dP 0" +# bgpd_flags="-dnrP 0" and so on +# +# If the quagga daemons require additional shared libraries to start, +# use the following variable to run ldconfig(8) in advance: +# quagga_extralibs_path="/usr/local/lib ..." +# + +. /etc/rc.subr + +mkdir -p /var/run/quagga + +name="quagga" +rcvar=`set_rcvar` + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + +# set defaults + +load_rc_config $name + +quagga_enable="YES" +quagga_flags="-d" +quagga_daemons="zebra ripd ripngd ospfd ospf6d bgpd isisd" +{quagga_extralibs_path="" + +quagga_cmd=$1 + +case "$1" in + force*) + quagga_cmd=${quagga_cmd#force} + ;; + fast*) + quagga_cmd=${quagga_cmd#fast} + ;; +esac + +case "${quagga_cmd}" in + start) + if [ ! -z ${quagga_extralibs_path} ]; then + /sbin/ldconfig -m ${quagga_extralibs_path} + fi + ;; + stop) + quagga_daemons=$(reverse_list ${quagga_daemons}) + ;; +esac + +for daemon in ${quagga_daemons}; do + command=/usr/local/sbin/${daemon} + required_files=/usr/local/etc/quagga/${daemon}.conf + pidfile=/var/run/quagga/${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}\"\} + run_rc_command "$1" +done diff --git a/packages/quagga/quagga.xml b/packages/quagga/quagga.xml new file mode 100644 index 00000000..1b5caedc --- /dev/null +++ b/packages/quagga/quagga.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<packagegui> + <service> + <name>quagga</name> + <description></description> + <rcfile>quagga.sh</rcfile> + <executable>quagga</executable> + </service> + <additional_files_needed> + <item>http://www.pfsense.org/packages/quagga/quagga.sh</item> + <prefix>/usr/local/etc/rc.d</prefix> + <chmod>0777</chmod> + </additional_files_needed> + <custom_php_deinstall_command> + mwexec("rm /usr/local/etc/rc.d/quagga*"); + mwexec("rm /usr/local/etc/rc.d/watchquagga"); + </custom_php_deinstall_command> +</packagegui> diff --git a/pkg_config.xml b/pkg_config.xml index ea868be8..c21bb14f 100644 --- a/pkg_config.xml +++ b/pkg_config.xml @@ -4,6 +4,16 @@ <pfsensepkgs> <packages> <package> + <name>quagga</name> + <website>http://www.quagga.net/</website> + <descr>*NO GUI - Uses Telnet*</descr> + <category>Network Management</category> + <depends_on_package_base_url>http://www.pfsense.com/packages/All</depends_on_package_base_url> + <depends_on_package>quagga-0.99.4_2.tbz</depends_on_package> + <status>PRE-ALPHA</status> + <version>0.99</version> + </package> + <package> <name>openntpd</name> <website>http://www.openntpd.org/</website> <descr>OpenNTPD NTP time server.</descr> @@ -21,8 +31,8 @@ <website>http://www.freenas.org/</website> <descr> <p> - FreeNAS is a free NAS (Network-Attached Storage) server, supporting: CIFS (samba), FTP, - NFS, RSYNC protocols, local user authentication, Software RAID (0,1,5) with a Full WEB + FreeNAS is a free NAS (Network-Attached Storage) server, supporting: CIFS (samba), FTP, + NFS, RSYNC protocols, local user authentication, Software RAID (0,1,5) with a Full WEB configuration interface. </p> <p> @@ -505,16 +515,6 @@ <configurationfile>doorman.xml</configurationfile> </package> <package> - <name>quagga</name> - <website>http://www.quagga.net/</website> - <descr>*NO GUI*</descr> - <category>Network Management</category> - <depends_on_package_base_url>http://www.pfsense.com/packages/All</depends_on_package_base_url> - <depends_on_package>quagga-0.98.5_1.tbz</depends_on_package> - <status>ALPHA</status> - <version>9.5</version> - </package> - <package> <name>zebra</name> <website>http://www.zebra.org/</website> <descr>*NO GUI*</descr> |