]> git.puffer.fish Git - mirror/frr.git/commitdiff
Adding following files:
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:03:46 +0000 (18:03 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:03:46 +0000 (18:03 -0700)
/etc
├── quagga
│   ├── bgpd.conf
│   ├── debian.conf
│   ├── ospf6d.conf
│   ├── ospfd.conf
│   ├── vtysh.conf
│   └── zebra.conf
└── sudoers.d
    └── quagga_sudoers

cumulus/etc/quagga/bgpd.conf [new file with mode: 0644]
cumulus/etc/quagga/debian.conf [new file with mode: 0644]
cumulus/etc/quagga/ospf6d.conf [new file with mode: 0644]
cumulus/etc/quagga/ospfd.conf [new file with mode: 0644]
cumulus/etc/quagga/vtysh.conf [new file with mode: 0644]
cumulus/etc/quagga/zebra.conf [new file with mode: 0644]
cumulus/etc/sudoers.d/quagga_sudoers [new file with mode: 0644]
debian/quagga.install
debian/quagga.postinst

diff --git a/cumulus/etc/quagga/bgpd.conf b/cumulus/etc/quagga/bgpd.conf
new file mode 100644 (file)
index 0000000..00a4fec
--- /dev/null
@@ -0,0 +1,5 @@
+hostname bgpd
+password cn321
+enable password cn321
+log timestamp precision 6
+log file /var/log/quagga/bgpd.log
diff --git a/cumulus/etc/quagga/debian.conf b/cumulus/etc/quagga/debian.conf
new file mode 100644 (file)
index 0000000..27ea461
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# If this option is set the /etc/init.d/quagga script automatically loads
+# the config via "vtysh -b" when the servers are started.
+# Check /etc/pam.d/quagga if you intend to use "vtysh"!
+#
+vtysh_enable=yes
+zebra_options="  --daemon -A 127.0.0.1"
+bgpd_options="   --daemon -A 127.0.0.1"
+ospfd_options="  --daemon -A 127.0.0.1"
+ospf6d_options=" --daemon -A ::1"
+ripd_options="   --daemon -A 127.0.0.1"
+ripngd_options=" --daemon -A ::1"
+isisd_options="  --daemon -A 127.0.0.1"
+babeld_options=" --daemon -A 127.0.0.1"
+# The list of daemons to watch is automatically generated by the init script.
+watchquagga_enable=yes
+watchquagga_options=(-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s /usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b bB -t 30)
diff --git a/cumulus/etc/quagga/ospf6d.conf b/cumulus/etc/quagga/ospf6d.conf
new file mode 100644 (file)
index 0000000..d24df73
--- /dev/null
@@ -0,0 +1,5 @@
+hostname ospfd
+password cn321
+enable password cn321
+log timestamp precision 6
+log file /var/log/quagga/ospf6d.log
diff --git a/cumulus/etc/quagga/ospfd.conf b/cumulus/etc/quagga/ospfd.conf
new file mode 100644 (file)
index 0000000..e20ed4a
--- /dev/null
@@ -0,0 +1,5 @@
+hostname ospfd
+password cn321
+enable password cn321
+log timestamp precision 6
+log file /var/log/quagga/ospfd.log
diff --git a/cumulus/etc/quagga/vtysh.conf b/cumulus/etc/quagga/vtysh.conf
new file mode 100644 (file)
index 0000000..80ceb00
--- /dev/null
@@ -0,0 +1,2 @@
+service integrated-vtysh-config
+username cumulus nopassword
diff --git a/cumulus/etc/quagga/zebra.conf b/cumulus/etc/quagga/zebra.conf
new file mode 100644 (file)
index 0000000..827c38a
--- /dev/null
@@ -0,0 +1,4 @@
+hostname zebra
+password cn321
+enable password cn321
+log file /var/log/quagga/zebra.log
diff --git a/cumulus/etc/sudoers.d/quagga_sudoers b/cumulus/etc/sudoers.d/quagga_sudoers
new file mode 100644 (file)
index 0000000..972966c
--- /dev/null
@@ -0,0 +1 @@
+Defaults env_keep += VTYSH_PAGER
index 1a7420dd238793b0f90d007a99fcaa5c1908cf6c..50cea8872cb51404653b82c09f96dbd02ee1e748 100644 (file)
@@ -15,3 +15,4 @@ usr/share/man/man8/isisd.8
 usr/share/man/man8/quagga-babeld.8
 usr/share/man/man8/watchquagga.8
 usr/share/snmp/mibs/
+cumulus/etc/* etc/
index bed2fd3cf707c2a6981e8eac15f9d81d6dc62862..7b1d000d811eae8689fd8d31ec2d9c662485f8f6 100644 (file)
@@ -1,5 +1,28 @@
 #!/bin/bash -e
 
+######################
+PASSWDFILE=/etc/passwd
+GROUPFILE=/etc/group
+
+quaggauid=`egrep "^quagga:" $PASSWDFILE | awk -F ":" '{ print $3 }'`
+quaggagid=`egrep "^quagga:" $GROUPFILE | awk -F ":" '{ print $3 }'`
+quaggavtygid=`egrep "^quaggavty:" $GROUPFILE | awk -F ":" '{ print $3 }'`
+
+[ -n ${quaggauid} ]    || (echo "No uid for quagga in ${PASSWDFILE}"   && /bin/false)
+[ -n ${quaggagid} ]    || (echo "No gid for quagga in ${GROUPFILE}"    && /bin/false)
+[ -n ${quaggaVTYgid} ] || (echo "No gid for quaggavty in ${GROUPFILE}" && /bin/false)
+
+chown -R ${quaggauid}:${quaggagid} /etc/quagga
+chgrp ${quaggavtygid} /etc/quagga/vtysh*
+chmod 440 /etc/sudoers.d/quagga_sudoers
+chmod 644 /etc/quagga/*
+
+ENVIRONMENTFILE=/etc/environment
+if ! grep --quiet VTYSH_PAGER=/bin/cat ${ENVIRONMENTFILE}; then
+    echo "VTYSH_PAGER=/bin/cat"  >> ${ENVIRONMENTFILE}
+fi
+##################################################
+
 if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
 ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"}