blob: 0b67836b42c83c0fec42b44bda028fe825bb5371 (
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: 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
|