summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet/node.def
blob: f3b4cac26b4fee4f71911cace4fe94613904ebd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 $(@)"
delete: "sudo ip link set $(@) down" ; "Error disabling dev $(@)"
#allowed: local -a array ;
# array=( /sys/class/net/{eth,vmnet}[0-9]+[^.] ) ;
# echo -n ${array[@]##*/}