summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet/node.def
blob: 05b2e03c40bf98832468f75cd5616ec500f4e0c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
tag:
priority: 318
type: txt
help: Set Ethernet interface name
comp_help: Enter Ethernet interface name (eth0 - eth999)

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: ip link set "$VAR(@)" up
	/opt/vyatta/sbin/vyatta-link-detect $VAR(@) on
delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0
        ip link set $VAR(@) down