From e828883fa3ea138aa5dc4836f872f50132e01bdb Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 29 Apr 2009 12:29:52 -0700 Subject: Move virtual-ethernet to pseudo-ethernet Avoid name-conflict with Xen --- templates/interfaces/pseudo-ethernet/link/node.def | 5 +++++ templates/interfaces/pseudo-ethernet/node.def | 12 ++++++++++++ .../pseudo-ethernet/node.tag/address/node.def | 13 +++++++++++++ .../pseudo-ethernet/node.tag/description/node.def | 4 ++++ .../node.tag/disable-link-detect/node.def | 3 +++ .../pseudo-ethernet/node.tag/disable/node.def | 16 ++++++++++++++++ .../pseudo-ethernet/node.tag/link/node.def | 5 +++++ .../interfaces/pseudo-ethernet/node.tag/mac/node.def | 6 ++++++ .../interfaces/pseudo-ethernet/node.tag/vif/node.def | 20 ++++++++++++++++++++ .../node.tag/vif/node.tag/address/node.def | 12 ++++++++++++ .../node.tag/vif/node.tag/description/node.def | 4 ++++ .../vif/node.tag/disable-link-detect/node.def | 3 +++ .../node.tag/vif/node.tag/disable/node.def | 11 +++++++++++ templates/interfaces/virtual-ethernet/link/node.def | 5 ----- templates/interfaces/virtual-ethernet/node.def | 12 ------------ .../virtual-ethernet/node.tag/address/node.def | 13 ------------- .../virtual-ethernet/node.tag/description/node.def | 4 ---- .../node.tag/disable-link-detect/node.def | 3 --- .../virtual-ethernet/node.tag/disable/node.def | 16 ---------------- .../virtual-ethernet/node.tag/link/node.def | 5 ----- .../virtual-ethernet/node.tag/mac/node.def | 6 ------ .../virtual-ethernet/node.tag/vif/node.def | 20 -------------------- .../node.tag/vif/node.tag/address/node.def | 12 ------------ .../node.tag/vif/node.tag/description/node.def | 4 ---- .../vif/node.tag/disable-link-detect/node.def | 3 --- .../node.tag/vif/node.tag/disable/node.def | 11 ----------- 26 files changed, 114 insertions(+), 114 deletions(-) create mode 100644 templates/interfaces/pseudo-ethernet/link/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/address/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/description/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/disable-link-detect/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/disable/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/link/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/mac/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/address/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def create mode 100644 templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable/node.def delete mode 100644 templates/interfaces/virtual-ethernet/link/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/address/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/description/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/disable-link-detect/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/disable/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/link/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/mac/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/vif/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/address/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/description/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def delete mode 100644 templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/disable/node.def (limited to 'templates') diff --git a/templates/interfaces/pseudo-ethernet/link/node.def b/templates/interfaces/pseudo-ethernet/link/node.def new file mode 100644 index 00000000..844cb8d8 --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/link/node.def @@ -0,0 +1,5 @@ +type: txt +syntax:expression: exec \ + "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=ethernet" +allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet +help: Specify the lower link device diff --git a/templates/interfaces/pseudo-ethernet/node.def b/templates/interfaces/pseudo-ethernet/node.def new file mode 100644 index 00000000..1279b788 --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.def @@ -0,0 +1,12 @@ +tag: +type: txt +help: Set Virtual Ethernet device +syntax:expression: pattern $VAR(@) "^peth[0-9]+$" \ + ; "name must be (peth0-peth999)" +commit:expression: $VAR(link) != "" + ; "link device must be set for virtual ethernet $VAR(@)" +create: sudo ip link add $VAR(@) link $VAR(link/@) type macvlan || exit 1 + sudo ip link set $VAR(@) up + /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on +delete: sudo ip link del link $VAR(@) link $VAR(link/@) +comp_help: Enter virtual ethernet interface name (peth0 - peth999) diff --git a/templates/interfaces/pseudo-ethernet/node.tag/address/node.def b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def new file mode 100644 index 00000000..15ac444d --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def @@ -0,0 +1,13 @@ +multi: +type: txt +help: Set an IP address for this interface +syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)" \ + ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" +update:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@) +delete:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@) +allowed: echo "dhcp <>" +comp_help:Possible completions: + Set the IP address and prefix length + Set the IPv6 address and prefix length + dhcp Set the IP address and prefix length via DHCP + diff --git a/templates/interfaces/pseudo-ethernet/node.tag/description/node.def b/templates/interfaces/pseudo-ethernet/node.tag/description/node.def new file mode 100644 index 00000000..d7becd13 --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/description/node.def @@ -0,0 +1,4 @@ +type: txt +help: Set description for this interface +update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias" +delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias" diff --git a/templates/interfaces/pseudo-ethernet/node.tag/disable-link-detect/node.def b/templates/interfaces/pseudo-ethernet/node.tag/disable-link-detect/node.def new file mode 100644 index 00000000..83858ec1 --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/disable-link-detect/node.def @@ -0,0 +1,3 @@ +help: Set to ignore link state changes on this interface +update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) on +delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) off diff --git a/templates/interfaces/pseudo-ethernet/node.tag/disable/node.def b/templates/interfaces/pseudo-ethernet/node.tag/disable/node.def new file mode 100644 index 00000000..3d3ffef9 --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/disable/node.def @@ -0,0 +1,16 @@ +help: Set interface disabled +create: vif=`/opt/vyatta/sbin/vyatta-interfaces.pl --vif=$VAR(../@) --show=all` + if [ ! -z "$vif" ]; then + echo "Can not disable interface " $VAR(../@) " with vif:" $vif + exit 1 + fi + /etc/netplug/linkdown.d/dhclient $VAR(../@) + if ! sudo ip link set $VAR(../@) down 2>/dev/null; then + echo "Error disabling dev $VAR(../@)" + /etc/netplug/linkup.d/dhclient $VAR(../@) + exit 1 + fi +delete: if ! sudo ip link set $VAR(../@) up; then + echo "Error enabling dev $VAR(../@)" + exit 1 + fi diff --git a/templates/interfaces/pseudo-ethernet/node.tag/link/node.def b/templates/interfaces/pseudo-ethernet/node.tag/link/node.def new file mode 100644 index 00000000..f16b0ec4 --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/link/node.def @@ -0,0 +1,5 @@ +type: txt +commit:expression: exec \ + "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=ethernet" +allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet +help: Specify the lower link device diff --git a/templates/interfaces/pseudo-ethernet/node.tag/mac/node.def b/templates/interfaces/pseudo-ethernet/node.tag/mac/node.def new file mode 100644 index 00000000..e1202aca --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/mac/node.def @@ -0,0 +1,6 @@ +type: macaddr +help: Set the Media Access Control (MAC) address of this interface +syntax:expression: exec "\ + /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --valid-mac $VAR(@)" +update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --set-mac $VAR(@) + diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.def new file mode 100644 index 00000000..bca63071 --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.def @@ -0,0 +1,20 @@ +tag: +type: u32 +help: Set Virtual Local Area Network (VLAN) ID +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" +create: read flags < /sys/class/net/$VAR(../@)/flags + if [ $(( flags & 1 )) -eq 0 ] + then + echo "Can not create VLAN on disabled interface: " $VAR(../@) + exit 1 + fi + sudo ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) || exit 1 + sudo ip link set "$VAR(../@).$VAR(@)" up + /opt/vyatta/sbin/vyatta-link-detect "$VAR(../@).$VAR(@)" on +delete: sudo ip link delete dev "$VAR(../@).$VAR(@)" type vlan id $VAR(@) +comp_help: possible completions: + <0-4094> Set VLAN ID + + + + diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/address/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/address/node.def new file mode 100644 index 00000000..4c93905f --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/address/node.def @@ -0,0 +1,12 @@ +multi: +type: txt +help: Set an IP address for this interface +syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../../@).$VAR(../@) "\ + ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../../@).$VAR(../@)" +create:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../../@).$VAR(../@) +delete:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../../@).$VAR(../@) +allowed: echo "dhcp <>" +comp_help:Possible completions: + Set the IP address and prefix length + Set the IPv6 address and prefix length + dhcp Set the IP address and prefix length via DHCP diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def new file mode 100644 index 00000000..40f04bcc --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def @@ -0,0 +1,4 @@ +type: txt +help: Set description for this interface +update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias" +delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias" diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def new file mode 100644 index 00000000..897113de --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def @@ -0,0 +1,3 @@ +help: Set to ignore link state changes on this interface +update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) on +delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) off diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable/node.def new file mode 100644 index 00000000..78b24870 --- /dev/null +++ b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/disable/node.def @@ -0,0 +1,11 @@ +help: Set interface disabled +update: /etc/netplug/linkdown.d/dhclient $VAR(../../@).$VAR(../@) + if ! sudo ip link set $VAR(../../@).$VAR(../@) down 2>/dev/null; then + echo "Error disabling dev $VAR(../../@).$VAR(../@)" + /etc/netplug/linkup.d/dhclient $VAR(../../@).$VAR(../@) + exit 1 + fi +delete: if ! sudo ip link set $VAR(../../@).$VAR(../@) up; then + echo "Error enabling dev $VAR(../../@).$VAR(../@)" + exit 1 + fi diff --git a/templates/interfaces/virtual-ethernet/link/node.def b/templates/interfaces/virtual-ethernet/link/node.def deleted file mode 100644 index 844cb8d8..00000000 --- a/templates/interfaces/virtual-ethernet/link/node.def +++ /dev/null @@ -1,5 +0,0 @@ -type: txt -syntax:expression: exec \ - "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=ethernet" -allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet -help: Specify the lower link device diff --git a/templates/interfaces/virtual-ethernet/node.def b/templates/interfaces/virtual-ethernet/node.def deleted file mode 100644 index a6118c8a..00000000 --- a/templates/interfaces/virtual-ethernet/node.def +++ /dev/null @@ -1,12 +0,0 @@ -tag: -type: txt -help: Set Virtual Ethernet device -syntax:expression: pattern $VAR(@) "^veth[0-9]+$" \ - ; "name must be (veth0-veth999)" -commit:expression: $VAR(link) != "" - ; "link device must be set for virtual ethernet $VAR(@)" -create: sudo ip link add $VAR(@) link $VAR(link/@) type macvlan || exit 1 - sudo ip link set $VAR(@) up - /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on -delete: sudo ip link del link $VAR(@) link $VAR(link/@) -comp_help: Enter virtual ethernet interface name (veth0 - veth999) diff --git a/templates/interfaces/virtual-ethernet/node.tag/address/node.def b/templates/interfaces/virtual-ethernet/node.tag/address/node.def deleted file mode 100644 index 15ac444d..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/address/node.def +++ /dev/null @@ -1,13 +0,0 @@ -multi: -type: txt -help: Set an IP address for this interface -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)" \ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" -update:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@) -delete:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@) -allowed: echo "dhcp <>" -comp_help:Possible completions: - Set the IP address and prefix length - Set the IPv6 address and prefix length - dhcp Set the IP address and prefix length via DHCP - diff --git a/templates/interfaces/virtual-ethernet/node.tag/description/node.def b/templates/interfaces/virtual-ethernet/node.tag/description/node.def deleted file mode 100644 index d7becd13..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/description/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: txt -help: Set description for this interface -update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias" -delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias" diff --git a/templates/interfaces/virtual-ethernet/node.tag/disable-link-detect/node.def b/templates/interfaces/virtual-ethernet/node.tag/disable-link-detect/node.def deleted file mode 100644 index 83858ec1..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/disable-link-detect/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Set to ignore link state changes on this interface -update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) on -delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) off diff --git a/templates/interfaces/virtual-ethernet/node.tag/disable/node.def b/templates/interfaces/virtual-ethernet/node.tag/disable/node.def deleted file mode 100644 index 3d3ffef9..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/disable/node.def +++ /dev/null @@ -1,16 +0,0 @@ -help: Set interface disabled -create: vif=`/opt/vyatta/sbin/vyatta-interfaces.pl --vif=$VAR(../@) --show=all` - if [ ! -z "$vif" ]; then - echo "Can not disable interface " $VAR(../@) " with vif:" $vif - exit 1 - fi - /etc/netplug/linkdown.d/dhclient $VAR(../@) - if ! sudo ip link set $VAR(../@) down 2>/dev/null; then - echo "Error disabling dev $VAR(../@)" - /etc/netplug/linkup.d/dhclient $VAR(../@) - exit 1 - fi -delete: if ! sudo ip link set $VAR(../@) up; then - echo "Error enabling dev $VAR(../@)" - exit 1 - fi diff --git a/templates/interfaces/virtual-ethernet/node.tag/link/node.def b/templates/interfaces/virtual-ethernet/node.tag/link/node.def deleted file mode 100644 index f16b0ec4..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/link/node.def +++ /dev/null @@ -1,5 +0,0 @@ -type: txt -commit:expression: exec \ - "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=ethernet" -allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet -help: Specify the lower link device diff --git a/templates/interfaces/virtual-ethernet/node.tag/mac/node.def b/templates/interfaces/virtual-ethernet/node.tag/mac/node.def deleted file mode 100644 index e1202aca..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/mac/node.def +++ /dev/null @@ -1,6 +0,0 @@ -type: macaddr -help: Set the Media Access Control (MAC) address of this interface -syntax:expression: exec "\ - /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --valid-mac $VAR(@)" -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --set-mac $VAR(@) - diff --git a/templates/interfaces/virtual-ethernet/node.tag/vif/node.def b/templates/interfaces/virtual-ethernet/node.tag/vif/node.def deleted file mode 100644 index bca63071..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/vif/node.def +++ /dev/null @@ -1,20 +0,0 @@ -tag: -type: u32 -help: Set Virtual Local Area Network (VLAN) ID -syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" -create: read flags < /sys/class/net/$VAR(../@)/flags - if [ $(( flags & 1 )) -eq 0 ] - then - echo "Can not create VLAN on disabled interface: " $VAR(../@) - exit 1 - fi - sudo ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) || exit 1 - sudo ip link set "$VAR(../@).$VAR(@)" up - /opt/vyatta/sbin/vyatta-link-detect "$VAR(../@).$VAR(@)" on -delete: sudo ip link delete dev "$VAR(../@).$VAR(@)" type vlan id $VAR(@) -comp_help: possible completions: - <0-4094> Set VLAN ID - - - - diff --git a/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/address/node.def b/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/address/node.def deleted file mode 100644 index 4c93905f..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/address/node.def +++ /dev/null @@ -1,12 +0,0 @@ -multi: -type: txt -help: Set an IP address for this interface -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../../@).$VAR(../@) "\ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../../@).$VAR(../@)" -create:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../../@).$VAR(../@) -delete:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../../@).$VAR(../@) -allowed: echo "dhcp <>" -comp_help:Possible completions: - Set the IP address and prefix length - Set the IPv6 address and prefix length - dhcp Set the IP address and prefix length via DHCP diff --git a/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/description/node.def b/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/description/node.def deleted file mode 100644 index 40f04bcc..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/description/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: txt -help: Set description for this interface -update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias" -delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias" diff --git a/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def b/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def deleted file mode 100644 index 897113de..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/disable-link-detect/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: Set to ignore link state changes on this interface -update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) on -delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) off diff --git a/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/disable/node.def b/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/disable/node.def deleted file mode 100644 index 78b24870..00000000 --- a/templates/interfaces/virtual-ethernet/node.tag/vif/node.tag/disable/node.def +++ /dev/null @@ -1,11 +0,0 @@ -help: Set interface disabled -update: /etc/netplug/linkdown.d/dhclient $VAR(../../@).$VAR(../@) - if ! sudo ip link set $VAR(../../@).$VAR(../@) down 2>/dev/null; then - echo "Error disabling dev $VAR(../../@).$VAR(../@)" - /etc/netplug/linkup.d/dhclient $VAR(../../@).$VAR(../@) - exit 1 - fi -delete: if ! sudo ip link set $VAR(../../@).$VAR(../@) up; then - echo "Error enabling dev $VAR(../../@).$VAR(../@)" - exit 1 - fi -- cgit v1.2.3