summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet/node.def
blob: 081cabb5504d04079890ea1a8dc155e7dc4a653e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
tag:
priority: 318
type: txt
help: Set ethernet interface
allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet
syntax:expression: pattern $VAR(@) "^eth[0-9]+$" \
		   ; "interface ethernet $VAR(@): not a valid name"
syntax:expression: exec \
    "if [ ! -d /sys/class/net/$VAR(@) ]; then \
        echo \"interface ethernet $VAR(@): does not exist\";
	exit 1; \
    fi"
create: sudo ip link set "$VAR(@)" up
	/opt/vyatta/sbin/vyatta-link-detect $VAR(@) on
delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0
        sudo ip link set $VAR(@) down