blob: b42e488674430336255f4de69ab26ae3ac3b1388 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
tag:
type: txt
help: Ethernet interface name
syntax:expression: exec " \
if [ -z \"`ip link | egrep -v 'eth[0-9]+[.]' | grep $VAR(@)`\" ]; then \
echo Invalid ethernet interface [$VAR(@)]; \
exit 1 ; \
fi ; "
update:expression: "sudo ip link set $VAR(@) up" ; "Error enabling dev $VAR(@)"
update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"interface $VAR(@)\" \
-c \"link-detect\"; "
delete:expression: "sudo ip link set $VAR(@) down" ; "Error disabling dev $VAR(@)"
allowed: local -a array ;
array=( /sys/class/net/{eth,vmnet}[0-9]+[^.] ) ;
echo -n ${array[@]##*/}
|