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