From 731a80bf6e92611cff0acbd6e9b7bf3b2b18a174 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Sat, 15 Dec 2007 12:39:14 -0800 Subject: Fix broken path for progresss-indicator. --- scripts/install-system.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-system.in b/scripts/install-system.in index 49634a03..5f7ccd74 100755 --- a/scripts/install-system.in +++ b/scripts/install-system.in @@ -818,7 +818,7 @@ unmount () { progress_indicator () { case "$1" in - "start") /usr/bin/progress-indicator $SPID & + "start") $bindir/progress-indicator $SPID & ;; "stop") rm -f /tmp/pi.$SPID sleep 1 -- cgit v1.2.3 From 36af5914de982f2770fba137c4beea9077cc6adb Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Sun, 16 Dec 2007 14:58:48 -0800 Subject: Add ethernet bridging. --- debian/control | 2 +- templates/interfaces/bridge/node.def | 7 +++++++ templates/interfaces/bridge/node.tag/aging/node.def | 5 +++++ templates/interfaces/bridge/node.tag/description/node.def | 2 ++ templates/interfaces/bridge/node.tag/disable/node.def | 8 ++++++++ .../interfaces/bridge/node.tag/forwarding-delay/node.def | 5 +++++ templates/interfaces/bridge/node.tag/hello-time/node.def | 5 +++++ templates/interfaces/bridge/node.tag/max-age/node.def | 5 +++++ templates/interfaces/bridge/node.tag/node.def | 1 + templates/interfaces/bridge/node.tag/priority/node.def | 5 +++++ templates/interfaces/bridge/node.tag/stp/node.def | 9 +++++++++ .../ethernet/node.tag/bridge-group/bridge/node.def | 12 ++++++++++++ .../interfaces/ethernet/node.tag/bridge-group/cost/node.def | 4 ++++ templates/interfaces/ethernet/node.tag/bridge-group/node.def | 2 ++ .../ethernet/node.tag/bridge-group/priority/node.def | 4 ++++ 15 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 templates/interfaces/bridge/node.def create mode 100644 templates/interfaces/bridge/node.tag/aging/node.def create mode 100644 templates/interfaces/bridge/node.tag/description/node.def create mode 100644 templates/interfaces/bridge/node.tag/disable/node.def create mode 100644 templates/interfaces/bridge/node.tag/forwarding-delay/node.def create mode 100644 templates/interfaces/bridge/node.tag/hello-time/node.def create mode 100644 templates/interfaces/bridge/node.tag/max-age/node.def create mode 100644 templates/interfaces/bridge/node.tag/node.def create mode 100644 templates/interfaces/bridge/node.tag/priority/node.def create mode 100644 templates/interfaces/bridge/node.tag/stp/node.def create mode 100644 templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def create mode 100644 templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def create mode 100644 templates/interfaces/ethernet/node.tag/bridge-group/node.def create mode 100644 templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def diff --git a/debian/control b/debian/control index 88938b4a..19f15004 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,7 @@ Depends: bash (>= 3.1), procps (>= 1:3.2.7-3), coreutils (>= 5.97-5.3), vyatta-cfg, sysv-rc, ifrename, ntp, sysklogd, busybox, ssh, whois, sudo, - snmpd, keepalived, vyatta-bash + snmpd, keepalived, vyatta-bash, bridge-utils Suggests: util-linux (>= 2.13-5), net-tools, ethtool, diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def new file mode 100644 index 00000000..d85c9afc --- /dev/null +++ b/templates/interfaces/bridge/node.def @@ -0,0 +1,7 @@ +tag: +type: txt +help: "Enter bridge interface name (br0 - br9)" +syntax: $(@) in "br0", "br1", "br2", "br3", "br4", "br5", "br6", "br7", "br8", "br9" ; "Must be (br0 - br9)" +create: "sudo brctl addbr $(@)" +delete: "sudo brctl delbr $(@)" + diff --git a/templates/interfaces/bridge/node.tag/aging/node.def b/templates/interfaces/bridge/node.tag/aging/node.def new file mode 100644 index 00000000..0b1dcd03 --- /dev/null +++ b/templates/interfaces/bridge/node.tag/aging/node.def @@ -0,0 +1,5 @@ +type: u32 +help: "Set the number of seconds a MAC address will be kept in the forwarding database" +default: 300 +update: "sudo brctl setageing $(../@) $(@)" +delete: "sudo brctl setageing $(../@) $(@)" diff --git a/templates/interfaces/bridge/node.tag/description/node.def b/templates/interfaces/bridge/node.tag/description/node.def new file mode 100644 index 00000000..481dce47 --- /dev/null +++ b/templates/interfaces/bridge/node.tag/description/node.def @@ -0,0 +1,2 @@ +type: txt +help: "Add a human-readable description of an interface" diff --git a/templates/interfaces/bridge/node.tag/disable/node.def b/templates/interfaces/bridge/node.tag/disable/node.def new file mode 100644 index 00000000..f72b8af3 --- /dev/null +++ b/templates/interfaces/bridge/node.tag/disable/node.def @@ -0,0 +1,8 @@ +type: bool +help: "Disable the bridge interface" +default: false +update: "if [ x$(@) == xtrue ]; then \ + sudo ip link set $(../@) down; \ + else \ + sudo ip link set $(../@) up; \ + fi; " diff --git a/templates/interfaces/bridge/node.tag/forwarding-delay/node.def b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def new file mode 100644 index 00000000..6634a7cc --- /dev/null +++ b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def @@ -0,0 +1,5 @@ +type: u32 +help: "Set the forwarding delay" +default: 15 +update: "sudo brctl setfd $(../@) $(@)" +delete: "sudo brctl setfd $(../@) $(@)" diff --git a/templates/interfaces/bridge/node.tag/hello-time/node.def b/templates/interfaces/bridge/node.tag/hello-time/node.def new file mode 100644 index 00000000..e7b59ab3 --- /dev/null +++ b/templates/interfaces/bridge/node.tag/hello-time/node.def @@ -0,0 +1,5 @@ +type: u32 +help: "Set the hello packet advertisment interval" +default: 2 +update: "sudo brctl sethello $(../@) $(@)" +delete: "sudo brctl sethello $(../@) $(@)" diff --git a/templates/interfaces/bridge/node.tag/max-age/node.def b/templates/interfaces/bridge/node.tag/max-age/node.def new file mode 100644 index 00000000..7fa3ecbe --- /dev/null +++ b/templates/interfaces/bridge/node.tag/max-age/node.def @@ -0,0 +1,5 @@ +type: u32 +help: "Set the interval at which neighbor bridges are removed" +default: 20 +update: "sudo brctl setmaxage $(../@) $(@)" +delete: "sudo brctl setmaxage $(../@) $(@)" diff --git a/templates/interfaces/bridge/node.tag/node.def b/templates/interfaces/bridge/node.tag/node.def new file mode 100644 index 00000000..07e13e91 --- /dev/null +++ b/templates/interfaces/bridge/node.tag/node.def @@ -0,0 +1 @@ +help: "Set bridge parameters" diff --git a/templates/interfaces/bridge/node.tag/priority/node.def b/templates/interfaces/bridge/node.tag/priority/node.def new file mode 100644 index 00000000..650958ef --- /dev/null +++ b/templates/interfaces/bridge/node.tag/priority/node.def @@ -0,0 +1,5 @@ +type: u32 +help: "Set the priority for this bridge" +default: 0 +update: "sudo brctl setbridgeprio $(../@) $(@)" +delete: "sudo brctl setbridgeprio $(../@) $(@)" diff --git a/templates/interfaces/bridge/node.tag/stp/node.def b/templates/interfaces/bridge/node.tag/stp/node.def new file mode 100644 index 00000000..eb87287b --- /dev/null +++ b/templates/interfaces/bridge/node.tag/stp/node.def @@ -0,0 +1,9 @@ +type: bool +help: "Enable spanning tree protocol" +default: false +update: "if [ x$(@) == xtrue ]; then \ + sudo brctl stp $(../@) on; \ + else \ + sudo brctl stp $(../@) off; \ + fi; " +delete: "sudo brctl stp $(../@) off" diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def new file mode 100644 index 00000000..f6ca51e4 --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def @@ -0,0 +1,12 @@ +type: txt +help: "Add this interface to a bridge-group" +syntax: exec " \ + if [ -z \"`sudo brctl show | grep $(@) `\" ]; then \ + echo bridge interface $(@) doesn\\'t exist on this system ; \ + exit 1 ; \ + fi ; " +update: "sudo brctl addif $(@) $(../../@)" +delete: "sudo brctl delif $(@) $(../../@)" +#allowed: local -a array ; +# array=( /sys/class/net/br* ) ; +# echo -n ${array[@]##*/} diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def new file mode 100644 index 00000000..1c2bbde1 --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def @@ -0,0 +1,4 @@ +type: u32 +help: "Set the path cost for this port" +commit: $(../bridge/) != ""; "Must configure bridge interface" +update: "sudo brctl setpathcost $(../../@) $(@)" diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/node.def new file mode 100644 index 00000000..b76b5d71 --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/bridge-group/node.def @@ -0,0 +1,2 @@ +help: "Add this interface to a bridge group" +commit: $(./bridge/) != ""; "Must set the bridge interface" diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def new file mode 100644 index 00000000..d254b082 --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def @@ -0,0 +1,4 @@ +type: u32 +help: "Set the path priority for this port" +commit: $(../bridge/) != ""; "Must configure bridge interface" +update: "sudo brctl setportprio $(../../@) $(@)" -- cgit v1.2.3