summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Hagen <khagen@multi-development.com>2014-06-25 18:42:26 +0200
committerKim Hagen <khagen@multi-development.com>2014-06-25 18:42:26 +0200
commit7283aab9f91a4361c67419f6c5522af197c79538 (patch)
treecffd8d8826599884cc0c5c1b98b69307db45c301
parent3587bfd1c3bd213a7693865f647f0357b86d18c2 (diff)
downloadvyatta-cfg-system-7283aab9f91a4361c67419f6c5522af197c79538.tar.gz
vyatta-cfg-system-7283aab9f91a4361c67419f6c5522af197c79538.zip
Fix variables.
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.def14
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/address/node.def6
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/bridge-group/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/description/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/dhcpv6-options/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable-link-detect/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable/node.def12
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/ip/enable-proxy-arp/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/mtu/node.def6
9 files changed, 27 insertions, 27 deletions
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.def
index 5d2f4393..cb9f913e 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.def
@@ -5,15 +5,15 @@ help: Nested Virtual Local Area Network (VLAN) ID
syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094"
val_help: u32:0-4094; VLAN ID
-create: if ! ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan proto 802.1q id $VAR(@)
- then echo "Error creating VLAN device $VAR(../@).$VAR(@)"
+create: if ! ip link add link $VAR(../../@).$VAR(../@) name "$VAR(../../@).$VAR(../@).$VAR(@)" type vlan proto 802.1q id $VAR(@)
+ then echo "Error creating VLAN device $VAR(../../@).$VAR(../@).$VAR(@)"
exit 1
fi
# if parent is up, then bring VLAN up
- if [ $(( $(cat /sys/class/net/$VAR(../@)/flags) & 1 )) -eq 1 ]
- then ip link set "$VAR(../@).$VAR(@)" up
+ if [ $(( $(cat /sys/class/net/$VAR(../../@).$VAR(../@)/flags) & 1 )) -eq 1 ]
+ then ip link set "$VAR(../../@).$VAR(../@).$VAR(@)" up
fi
- /opt/vyatta/sbin/vyatta-link-detect "$VAR(../@).$VAR(@)" on
+ /opt/vyatta/sbin/vyatta-link-detect "$VAR(../../@).$VAR(../@).$VAR(@)" on
-delete: [ -d /sys/class/net/$VAR(../@).$VAR(@) ] || exit 0
- ip link delete dev "$VAR(../@).$VAR(@)" type vlan proto 802.1q id $VAR(@)
+delete: [ -d /sys/class/net/$VAR(../../@).$VAR(../@).$VAR(@) ] || exit 0
+ ip link delete dev "$VAR(../../@).$VAR(../@).$VAR(@)" type vlan proto 802.1q id $VAR(@)
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/address/node.def
index db361f38..93476d60 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/address/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/address/node.def
@@ -4,11 +4,11 @@ help: IP address
syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
-commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../@).$VAR(../@)"
+commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../../@).$VAR(../../@).$VAR(../@)"
-create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../../@).$VAR(../@) $VAR(@)
+create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../../../@).$VAR(../../@).$VAR(../@) $VAR(@)
-delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../../@).$VAR(../@) $VAR(@)
+delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../../../@).$VAR(../../@).$VAR(../@) $VAR(@)
allowed: echo "dhcp <>"
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/bridge-group/node.def
index dfd046c2..a2f2ae42 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/bridge-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/bridge-group/node.def
@@ -1,4 +1,4 @@
priority: 320
help: Add this interface to a bridge group
-end: /opt/vyatta/sbin/vyatta-bridge.pl ${COMMIT_ACTION} $VAR(../../@).$VAR(../@)
+end: /opt/vyatta/sbin/vyatta-bridge.pl ${COMMIT_ACTION} $VAR(../../../@).$VAR(../../@).$VAR(../@)
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/description/node.def
index a0b29f05..9324ce1b 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/description/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/description/node.def
@@ -4,5 +4,5 @@ help: Description
syntax:expression: pattern $VAR(@) "^.{1,256}$" \
; "interface description is too long (limit 256 characters)"
-update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
-delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
+update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../../@).$VAR(../../@).$VAR(../@)/ifalias"
+delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../../@).$VAR(../../@).$VAR(../@)/ifalias"
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/dhcpv6-options/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/dhcpv6-options/node.def
index 9cf861b4..805315fc 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/dhcpv6-options/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/dhcpv6-options/node.def
@@ -12,7 +12,7 @@ priority: 317 # Run before interface has been configured
help: DHCPv6 options
end:
- ifname="$VAR(../../@).$VAR(../@)"
+ ifname="$VAR(../../../@).$VAR(../../@).$VAR(../@)"
dhcpv6_set=0
for param in $VAR(../address/@@); do
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable-link-detect/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable-link-detect/node.def
index 5f60e6ab..ed593317 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable-link-detect/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable-link-detect/node.def
@@ -1,3 +1,3 @@
help: Ignore link state changes
-update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) on
-delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../@).$VAR(../@) off
+update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../../@).$VAR(../../@).$VAR(../@) on
+delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../../../@).$VAR(../../@).$VAR(../@) off
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable/node.def
index e9943645..31c5a9b2 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/disable/node.def
@@ -1,11 +1,11 @@
help: Disable interface
-update: /etc/netplug/linkdown.d/dhclient $VAR(../../@).$VAR(../@)
- if ! ip link set $VAR(../../@).$VAR(../@) down 2>/dev/null; then
- echo "Error disabling dev $VAR(../../@).$VAR(../@)"
- /etc/netplug/linkup.d/dhclient $VAR(../../@).$VAR(../@)
+update: /etc/netplug/linkdown.d/dhclient $VAR(../../../@).$VAR(../../@).$VAR(../@)
+ if ! ip link set $VAR(../../../@).$VAR(../../@).$VAR(../@) down 2>/dev/null; then
+ echo "Error disabling dev $VAR(../../../@).$VAR(../../@).$VAR(../@)"
+ /etc/netplug/linkup.d/dhclient $VAR(../../../@).$VAR(../../@).$VAR(../@)
exit 1
fi
-delete: if ! ip link set $VAR(../../@).$VAR(../@) up; then
- echo "Error enabling dev $VAR(../../@).$VAR(../@)"
+delete: if ! ip link set $VAR(../../../@).$VAR(../../@).$VAR(../@) up; then
+ echo "Error enabling dev $VAR(../../../@).$VAR(../../@).$VAR(../@)"
exit 1
fi
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/ip/enable-proxy-arp/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/ip/enable-proxy-arp/node.def
index cd6d56d9..dd572811 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/ip/enable-proxy-arp/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/ip/enable-proxy-arp/node.def
@@ -1,3 +1,3 @@
help: Enable proxy-arp on this interface
-create:expression: "sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/$VAR(../../../@).$VAR(../../@)/proxy_arp\" "
-delete:expression: "sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/$VAR(../../../@).$VAR(../../@)/proxy_arp\" "
+create:expression: "sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/$VAR(../../../../@).$VAR(../../../@).$VAR(../../@)/proxy_arp\" "
+delete:expression: "sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/$VAR(../../../../@).$VAR(../../../@).$VAR(../../@)/proxy_arp\" "
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/mtu/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/mtu/node.def
index e0d3c3f9..eea81e2a 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/mtu/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vif/node.tag/mtu/node.def
@@ -4,6 +4,6 @@ help: Maximum Transmission Unit (MTU)
val_help: u32:68-9000; Maximum Transmission Unit (MTU)
syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "MTU must be between 68 and 9000"
-update: ip link set $VAR(../../@).$VAR(../@) mtu $VAR(@)
-delete: [ -d /sys/class/net/$VAR(../../@).$VAR(../@) ] || exit 0
- ip link set $VAR(../../@).$VAR(../@) mtu 1500
+update: ip link set $VAR(../../../@).$VAR(../../@).$VAR(../@) mtu $VAR(@)
+delete: [ -d /sys/class/net/$VAR(../../../@).$VAR(../../@).$VAR(../@) ] || exit 0
+ ip link set $VAR(../../../@).$VAR(../../@).$VAR(../@) mtu 1500