From 4a21cd578978d40398d55f40b8e9a7d2a90993b5 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Wed, 17 Feb 2021 12:01:46 -0800 Subject: [PATCH] pygui: updated sample1.xml to update the background stored due to multi canvas changes --- daemon/core/gui/data/xmls/sample1.xml | 1059 +++++++++++++------------ 1 file changed, 543 insertions(+), 516 deletions(-) diff --git a/daemon/core/gui/data/xmls/sample1.xml b/daemon/core/gui/data/xmls/sample1.xml index 5055c225..c9e12940 100644 --- a/daemon/core/gui/data/xmls/sample1.xml +++ b/daemon/core/gui/data/xmls/sample1.xml @@ -1,16 +1,16 @@ - + - - + + - - + + - - + + @@ -18,8 +18,8 @@ - - + + @@ -27,8 +27,8 @@ - - + + @@ -36,32 +36,32 @@ - - + + - - + + - - + + - - + + @@ -69,41 +69,41 @@ - - + + - - + + - - + + - - + + - - + + - + - - + + @@ -113,70 +113,65 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -186,6 +181,7 @@ + @@ -198,6 +194,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -214,26 +238,7 @@ killall zebra - interface eth0 - ip address 10.0.3.2/24 - ipv6 address a:3::2/64 -! -interface eth1 - ip address 10.0.5.1/24 - ipv6 address a:5::1/64 -! -router ospf - router-id 10.0.3.2 - network 10.0.3.0/24 area 0 - network 10.0.5.0/24 area 0 -! -router ospf6 - router-id 10.0.3.2 - interface eth0 area 0.0.0.0 - interface eth1 area 0.0.0.0 -! - - #!/bin/sh + CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf fi - # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then + # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf fi } @@ -278,7 +283,7 @@ bootdaemon() flags="" - if [ "$1" = "xpimd" ] && \ + if [ "$1" = "xpimd" ] && \ grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then flags="$flags -6" fi @@ -300,14 +305,14 @@ bootquagga() fi # fix /var/run/quagga permissions - id -u quagga 2>/dev/null >/dev/null + id -u quagga 2>/dev/null >/dev/null if [ "$?" = "0" ]; then chown quagga $QUAGGA_STATE_DIR fi bootdaemon "zebra" for r in rip ripng ospf6 ospf bgp babel; do - if grep -q "^router \<${r}\>" $QUAGGA_CONF; then + if grep -q "^router \<${r}\>" $QUAGGA_CONF; then bootdaemon "${r}d" fi done @@ -325,9 +330,28 @@ if [ "$1" != "zebra" ]; then fi confcheck bootquagga - - service integrated-vtysh-config - +]]> + + @@ -351,7 +375,7 @@ bootquagga sh ipforward.sh - #!/bin/sh + +]]> @@ -385,26 +409,7 @@ bootquagga killall zebra - interface eth0 - ip address 10.0.1.1/24 - ipv6 address a:1::1/64 -! -interface eth1 - ip address 10.0.2.1/24 - ipv6 address a:2::1/64 -! -router ospf - router-id 10.0.1.1 - network 10.0.1.0/24 area 0 - network 10.0.2.0/24 area 0 -! -router ospf6 - router-id 10.0.1.1 - interface eth0 area 0.0.0.0 - interface eth1 area 0.0.0.0 -! - - #!/bin/sh + CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf fi - # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then + # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf fi } @@ -449,7 +454,7 @@ bootdaemon() flags="" - if [ "$1" = "xpimd" ] && \ + if [ "$1" = "xpimd" ] && \ grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then flags="$flags -6" fi @@ -471,14 +476,14 @@ bootquagga() fi # fix /var/run/quagga permissions - id -u quagga 2>/dev/null >/dev/null + id -u quagga 2>/dev/null >/dev/null if [ "$?" = "0" ]; then chown quagga $QUAGGA_STATE_DIR fi bootdaemon "zebra" for r in rip ripng ospf6 ospf bgp babel; do - if grep -q "^router \<${r}\>" $QUAGGA_CONF; then + if grep -q "^router \<${r}\>" $QUAGGA_CONF; then bootdaemon "${r}d" fi done @@ -496,9 +501,28 @@ if [ "$1" != "zebra" ]; then fi confcheck bootquagga - - service integrated-vtysh-config - +]]> + + @@ -522,7 +546,7 @@ bootquagga sh ipforward.sh - #!/bin/sh + +]]> @@ -556,7 +580,100 @@ bootquagga killall zebra - interface eth0 + CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then + ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf + fi + # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then + ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf + fi +} + +bootdaemon() +{ + QUAGGA_SBIN_DIR=$(searchforprog $1 $QUAGGA_SBIN_SEARCH) + if [ "z$QUAGGA_SBIN_DIR" = "z" ]; then + echo "ERROR: Quagga's '$1' daemon not found in search path:" + echo " $QUAGGA_SBIN_SEARCH" + return 1 + fi + + flags="" + + if [ "$1" = "xpimd" ] && \ + grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then + flags="$flags -6" + fi + + $QUAGGA_SBIN_DIR/$1 $flags -d + if [ "$?" != "0" ]; then + echo "ERROR: Quagga's '$1' daemon failed to start!:" + return 1 + fi +} + +bootquagga() +{ + QUAGGA_BIN_DIR=$(searchforprog 'vtysh' $QUAGGA_BIN_SEARCH) + if [ "z$QUAGGA_BIN_DIR" = "z" ]; then + echo "ERROR: Quagga's 'vtysh' program not found in search path:" + echo " $QUAGGA_BIN_SEARCH" + return 1 + fi + + # fix /var/run/quagga permissions + id -u quagga 2>/dev/null >/dev/null + if [ "$?" = "0" ]; then + chown quagga $QUAGGA_STATE_DIR + fi + + bootdaemon "zebra" + for r in rip ripng ospf6 ospf bgp babel; do + if grep -q "^router \<${r}\>" $QUAGGA_CONF; then + bootdaemon "${r}d" + fi + done + + if grep -E -q '^[[:space:]]*router[[:space:]]+pim6?[[:space:]]*$' $QUAGGA_CONF; then + bootdaemon "xpimd" + fi + + $QUAGGA_BIN_DIR/vtysh -b +} + +if [ "$1" != "zebra" ]; then + echo "WARNING: '$1': all Quagga daemons are launched by the 'zebra' service!" + exit 1 +fi +confcheck +bootquagga +]]> + - #!/bin/sh -# auto-generated by zebra service (quagga.py) -QUAGGA_CONF=/usr/local/etc/quagga/Quagga.conf -QUAGGA_SBIN_SEARCH="/usr/local/sbin /usr/sbin /usr/lib/quagga" -QUAGGA_BIN_SEARCH="/usr/local/bin /usr/bin /usr/lib/quagga" -QUAGGA_STATE_DIR=/var/run/quagga - -searchforprog() -{ - prog=$1 - searchpath=$@ - ret= - for p in $searchpath; do - if [ -x $p/$prog ]; then - ret=$p - break - fi - done - echo $ret -} - -confcheck() -{ - CONF_DIR=`dirname $QUAGGA_CONF` - # if /etc/quagga exists, point /etc/quagga/Quagga.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then - ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf - fi - # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then - ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf - fi -} - -bootdaemon() -{ - QUAGGA_SBIN_DIR=$(searchforprog $1 $QUAGGA_SBIN_SEARCH) - if [ "z$QUAGGA_SBIN_DIR" = "z" ]; then - echo "ERROR: Quagga's '$1' daemon not found in search path:" - echo " $QUAGGA_SBIN_SEARCH" - return 1 - fi - - flags="" - - if [ "$1" = "xpimd" ] && \ - grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then - flags="$flags -6" - fi - - $QUAGGA_SBIN_DIR/$1 $flags -d - if [ "$?" != "0" ]; then - echo "ERROR: Quagga's '$1' daemon failed to start!:" - return 1 - fi -} - -bootquagga() -{ - QUAGGA_BIN_DIR=$(searchforprog 'vtysh' $QUAGGA_BIN_SEARCH) - if [ "z$QUAGGA_BIN_DIR" = "z" ]; then - echo "ERROR: Quagga's 'vtysh' program not found in search path:" - echo " $QUAGGA_BIN_SEARCH" - return 1 - fi - - # fix /var/run/quagga permissions - id -u quagga 2>/dev/null >/dev/null - if [ "$?" = "0" ]; then - chown quagga $QUAGGA_STATE_DIR - fi - - bootdaemon "zebra" - for r in rip ripng ospf6 ospf bgp babel; do - if grep -q "^router \<${r}\>" $QUAGGA_CONF; then - bootdaemon "${r}d" - fi - done - - if grep -E -q '^[[:space:]]*router[[:space:]]+pim6?[[:space:]]*$' $QUAGGA_CONF; then - bootdaemon "xpimd" - fi - - $QUAGGA_BIN_DIR/vtysh -b -} - -if [ "$1" != "zebra" ]; then - echo "WARNING: '$1': all Quagga daemons are launched by the 'zebra' service!" - exit 1 -fi -confcheck -bootquagga - - service integrated-vtysh-config - +]]> + @@ -699,7 +723,7 @@ bootquagga sh ipforward.sh - #!/bin/sh + +]]> @@ -736,24 +760,7 @@ bootquagga killall zebra - interface eth0 - ip address 10.0.0.9/32 - ipv6 address a::9/128 - ipv6 ospf6 instance-id 65 - ipv6 ospf6 hello-interval 2 - ipv6 ospf6 dead-interval 6 - ipv6 ospf6 retransmit-interval 5 - ipv6 ospf6 network manet-designated-router - ipv6 ospf6 diffhellos - ipv6 ospf6 adjacencyconnectivity uniconnected - ipv6 ospf6 lsafullness mincostlsa -! -router ospf6 - router-id 10.0.0.9 - interface eth0 area 0.0.0.0 -! - - #!/bin/sh + CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf fi - # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then + # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf fi } @@ -798,7 +805,7 @@ bootdaemon() flags="" - if [ "$1" = "xpimd" ] && \ + if [ "$1" = "xpimd" ] && \ grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then flags="$flags -6" fi @@ -820,14 +827,14 @@ bootquagga() fi # fix /var/run/quagga permissions - id -u quagga 2>/dev/null >/dev/null + id -u quagga 2>/dev/null >/dev/null if [ "$?" = "0" ]; then chown quagga $QUAGGA_STATE_DIR fi bootdaemon "zebra" for r in rip ripng ospf6 ospf bgp babel; do - if grep -q "^router \<${r}\>" $QUAGGA_CONF; then + if grep -q "^router \<${r}\>" $QUAGGA_CONF; then bootdaemon "${r}d" fi done @@ -845,9 +852,26 @@ if [ "$1" != "zebra" ]; then fi confcheck bootquagga - - service integrated-vtysh-config - +]]> + + @@ -863,7 +887,7 @@ bootquagga sh ipforward.sh - #!/bin/sh + +]]> @@ -894,24 +918,7 @@ bootquagga killall zebra - interface eth0 - ip address 10.0.0.6/32 - ipv6 address a::6/128 - ipv6 ospf6 instance-id 65 - ipv6 ospf6 hello-interval 2 - ipv6 ospf6 dead-interval 6 - ipv6 ospf6 retransmit-interval 5 - ipv6 ospf6 network manet-designated-router - ipv6 ospf6 diffhellos - ipv6 ospf6 adjacencyconnectivity uniconnected - ipv6 ospf6 lsafullness mincostlsa -! -router ospf6 - router-id 10.0.0.6 - interface eth0 area 0.0.0.0 -! - - #!/bin/sh + CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf fi - # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then + # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf fi } @@ -956,7 +963,7 @@ bootdaemon() flags="" - if [ "$1" = "xpimd" ] && \ + if [ "$1" = "xpimd" ] && \ grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then flags="$flags -6" fi @@ -978,14 +985,14 @@ bootquagga() fi # fix /var/run/quagga permissions - id -u quagga 2>/dev/null >/dev/null + id -u quagga 2>/dev/null >/dev/null if [ "$?" = "0" ]; then chown quagga $QUAGGA_STATE_DIR fi bootdaemon "zebra" for r in rip ripng ospf6 ospf bgp babel; do - if grep -q "^router \<${r}\>" $QUAGGA_CONF; then + if grep -q "^router \<${r}\>" $QUAGGA_CONF; then bootdaemon "${r}d" fi done @@ -1003,9 +1010,26 @@ if [ "$1" != "zebra" ]; then fi confcheck bootquagga - - service integrated-vtysh-config - +]]> + + @@ -1021,7 +1045,7 @@ bootquagga sh ipforward.sh - #!/bin/sh + +]]> @@ -1052,24 +1076,7 @@ bootquagga killall zebra - interface eth0 - ip address 10.0.0.7/32 - ipv6 address a::7/128 - ipv6 ospf6 instance-id 65 - ipv6 ospf6 hello-interval 2 - ipv6 ospf6 dead-interval 6 - ipv6 ospf6 retransmit-interval 5 - ipv6 ospf6 network manet-designated-router - ipv6 ospf6 diffhellos - ipv6 ospf6 adjacencyconnectivity uniconnected - ipv6 ospf6 lsafullness mincostlsa -! -router ospf6 - router-id 10.0.0.7 - interface eth0 area 0.0.0.0 -! - - #!/bin/sh + CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf fi - # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then + # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf fi } @@ -1114,7 +1121,7 @@ bootdaemon() flags="" - if [ "$1" = "xpimd" ] && \ + if [ "$1" = "xpimd" ] && \ grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then flags="$flags -6" fi @@ -1136,14 +1143,14 @@ bootquagga() fi # fix /var/run/quagga permissions - id -u quagga 2>/dev/null >/dev/null + id -u quagga 2>/dev/null >/dev/null if [ "$?" = "0" ]; then chown quagga $QUAGGA_STATE_DIR fi bootdaemon "zebra" for r in rip ripng ospf6 ospf bgp babel; do - if grep -q "^router \<${r}\>" $QUAGGA_CONF; then + if grep -q "^router \<${r}\>" $QUAGGA_CONF; then bootdaemon "${r}d" fi done @@ -1161,9 +1168,26 @@ if [ "$1" != "zebra" ]; then fi confcheck bootquagga - - service integrated-vtysh-config - +]]> + + @@ -1179,7 +1203,7 @@ bootquagga sh ipforward.sh - #!/bin/sh + +]]> @@ -1210,7 +1234,100 @@ bootquagga killall zebra - interface eth0 + CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then + ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf + fi + # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then + ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf + fi +} + +bootdaemon() +{ + QUAGGA_SBIN_DIR=$(searchforprog $1 $QUAGGA_SBIN_SEARCH) + if [ "z$QUAGGA_SBIN_DIR" = "z" ]; then + echo "ERROR: Quagga's '$1' daemon not found in search path:" + echo " $QUAGGA_SBIN_SEARCH" + return 1 + fi + + flags="" + + if [ "$1" = "xpimd" ] && \ + grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then + flags="$flags -6" + fi + + $QUAGGA_SBIN_DIR/$1 $flags -d + if [ "$?" != "0" ]; then + echo "ERROR: Quagga's '$1' daemon failed to start!:" + return 1 + fi +} + +bootquagga() +{ + QUAGGA_BIN_DIR=$(searchforprog 'vtysh' $QUAGGA_BIN_SEARCH) + if [ "z$QUAGGA_BIN_DIR" = "z" ]; then + echo "ERROR: Quagga's 'vtysh' program not found in search path:" + echo " $QUAGGA_BIN_SEARCH" + return 1 + fi + + # fix /var/run/quagga permissions + id -u quagga 2>/dev/null >/dev/null + if [ "$?" = "0" ]; then + chown quagga $QUAGGA_STATE_DIR + fi + + bootdaemon "zebra" + for r in rip ripng ospf6 ospf bgp babel; do + if grep -q "^router \<${r}\>" $QUAGGA_CONF; then + bootdaemon "${r}d" + fi + done + + if grep -E -q '^[[:space:]]*router[[:space:]]+pim6?[[:space:]]*$' $QUAGGA_CONF; then + bootdaemon "xpimd" + fi + + $QUAGGA_BIN_DIR/vtysh -b +} + +if [ "$1" != "zebra" ]; then + echo "WARNING: '$1': all Quagga daemons are launched by the 'zebra' service!" + exit 1 +fi +confcheck +bootquagga +]]> + - #!/bin/sh -# auto-generated by zebra service (quagga.py) -QUAGGA_CONF=/usr/local/etc/quagga/Quagga.conf -QUAGGA_SBIN_SEARCH="/usr/local/sbin /usr/sbin /usr/lib/quagga" -QUAGGA_BIN_SEARCH="/usr/local/bin /usr/bin /usr/lib/quagga" -QUAGGA_STATE_DIR=/var/run/quagga - -searchforprog() -{ - prog=$1 - searchpath=$@ - ret= - for p in $searchpath; do - if [ -x $p/$prog ]; then - ret=$p - break - fi - done - echo $ret -} - -confcheck() -{ - CONF_DIR=`dirname $QUAGGA_CONF` - # if /etc/quagga exists, point /etc/quagga/Quagga.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then - ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf - fi - # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then - ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf - fi -} - -bootdaemon() -{ - QUAGGA_SBIN_DIR=$(searchforprog $1 $QUAGGA_SBIN_SEARCH) - if [ "z$QUAGGA_SBIN_DIR" = "z" ]; then - echo "ERROR: Quagga's '$1' daemon not found in search path:" - echo " $QUAGGA_SBIN_SEARCH" - return 1 - fi - - flags="" - - if [ "$1" = "xpimd" ] && \ - grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then - flags="$flags -6" - fi - - $QUAGGA_SBIN_DIR/$1 $flags -d - if [ "$?" != "0" ]; then - echo "ERROR: Quagga's '$1' daemon failed to start!:" - return 1 - fi -} - -bootquagga() -{ - QUAGGA_BIN_DIR=$(searchforprog 'vtysh' $QUAGGA_BIN_SEARCH) - if [ "z$QUAGGA_BIN_DIR" = "z" ]; then - echo "ERROR: Quagga's 'vtysh' program not found in search path:" - echo " $QUAGGA_BIN_SEARCH" - return 1 - fi - - # fix /var/run/quagga permissions - id -u quagga 2>/dev/null >/dev/null - if [ "$?" = "0" ]; then - chown quagga $QUAGGA_STATE_DIR - fi - - bootdaemon "zebra" - for r in rip ripng ospf6 ospf bgp babel; do - if grep -q "^router \<${r}\>" $QUAGGA_CONF; then - bootdaemon "${r}d" - fi - done - - if grep -E -q '^[[:space:]]*router[[:space:]]+pim6?[[:space:]]*$' $QUAGGA_CONF; then - bootdaemon "xpimd" - fi - - $QUAGGA_BIN_DIR/vtysh -b -} - -if [ "$1" != "zebra" ]; then - echo "WARNING: '$1': all Quagga daemons are launched by the 'zebra' service!" - exit 1 -fi -confcheck -bootquagga - - service integrated-vtysh-config - +]]> + @@ -1363,7 +1387,7 @@ bootquagga sh ipforward.sh - #!/bin/sh + +]]> @@ -1397,24 +1421,7 @@ bootquagga killall zebra - interface eth0 - ip address 10.0.0.8/32 - ipv6 address a::8/128 - ipv6 ospf6 instance-id 65 - ipv6 ospf6 hello-interval 2 - ipv6 ospf6 dead-interval 6 - ipv6 ospf6 retransmit-interval 5 - ipv6 ospf6 network manet-designated-router - ipv6 ospf6 diffhellos - ipv6 ospf6 adjacencyconnectivity uniconnected - ipv6 ospf6 lsafullness mincostlsa -! -router ospf6 - router-id 10.0.0.8 - interface eth0 area 0.0.0.0 -! - - #!/bin/sh + CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf fi - # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then + # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf fi } @@ -1459,7 +1466,7 @@ bootdaemon() flags="" - if [ "$1" = "xpimd" ] && \ + if [ "$1" = "xpimd" ] && \ grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then flags="$flags -6" fi @@ -1481,14 +1488,14 @@ bootquagga() fi # fix /var/run/quagga permissions - id -u quagga 2>/dev/null >/dev/null + id -u quagga 2>/dev/null >/dev/null if [ "$?" = "0" ]; then chown quagga $QUAGGA_STATE_DIR fi bootdaemon "zebra" for r in rip ripng ospf6 ospf bgp babel; do - if grep -q "^router \<${r}\>" $QUAGGA_CONF; then + if grep -q "^router \<${r}\>" $QUAGGA_CONF; then bootdaemon "${r}d" fi done @@ -1506,9 +1513,26 @@ if [ "$1" != "zebra" ]; then fi confcheck bootquagga - - service integrated-vtysh-config - +]]> + + @@ -1524,7 +1548,7 @@ bootquagga sh ipforward.sh - #!/bin/sh + +]]> @@ -1545,11 +1569,11 @@ bootquagga sh defaultroute.sh - #!/bin/sh + +]]> @@ -1557,11 +1581,11 @@ ip route add default via a:1::1 sh defaultroute.sh - #!/bin/sh + +]]> @@ -1569,11 +1593,11 @@ ip route add default via a:1::1 sh defaultroute.sh - #!/bin/sh + +]]> @@ -1581,11 +1605,11 @@ ip route add default via a:1::1 sh defaultroute.sh - #!/bin/sh + +]]> @@ -1600,14 +1624,14 @@ ip route add default via a:1::1 killall sshd - #!/bin/sh + - # auto-generated by SSH service (utility.py) +]]> + +]]> @@ -1662,32 +1686,7 @@ UseDNS no killall zebra - interface eth0 - ip address 10.0.4.2/24 - ipv6 address a:4::2/64 -! -interface eth1 - ip address 10.0.5.2/24 - ipv6 address a:5::2/64 -! -interface eth2 - ip address 10.0.6.1/24 - ipv6 address a:6::1/64 -! -router ospf - router-id 10.0.4.2 - network 10.0.4.0/24 area 0 - network 10.0.5.0/24 area 0 - network 10.0.6.0/24 area 0 -! -router ospf6 - router-id 10.0.4.2 - interface eth0 area 0.0.0.0 - interface eth1 area 0.0.0.0 - interface eth2 area 0.0.0.0 -! - - #!/bin/sh + CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/Quagga.conf ]; then ln -s $CONF_DIR/Quagga.conf /etc/quagga/Quagga.conf fi - # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR - if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then + # if /etc/quagga exists, point /etc/quagga/vtysh.conf -> CONF_DIR + if [ "$CONF_DIR" != "/etc/quagga" ] && [ -d /etc/quagga ] && [ ! -e /etc/quagga/vtysh.conf ]; then ln -s $CONF_DIR/vtysh.conf /etc/quagga/vtysh.conf fi } @@ -1732,7 +1731,7 @@ bootdaemon() flags="" - if [ "$1" = "xpimd" ] && \ + if [ "$1" = "xpimd" ] && \ grep -E -q '^[[:space:]]*router[[:space:]]+pim6[[:space:]]*$' $QUAGGA_CONF; then flags="$flags -6" fi @@ -1754,14 +1753,14 @@ bootquagga() fi # fix /var/run/quagga permissions - id -u quagga 2>/dev/null >/dev/null + id -u quagga 2>/dev/null >/dev/null if [ "$?" = "0" ]; then chown quagga $QUAGGA_STATE_DIR fi bootdaemon "zebra" for r in rip ripng ospf6 ospf bgp babel; do - if grep -q "^router \<${r}\>" $QUAGGA_CONF; then + if grep -q "^router \<${r}\>" $QUAGGA_CONF; then bootdaemon "${r}d" fi done @@ -1779,9 +1778,34 @@ if [ "$1" != "zebra" ]; then fi confcheck bootquagga - - service integrated-vtysh-config - +]]> + + @@ -1805,7 +1829,7 @@ bootquagga sh ipforward.sh - #!/bin/sh + +]]> @@ -1840,10 +1864,13 @@ bootquagga + - - + + + +