static usb ethnet addresses
[automated-distro-installer] / fai / config / class / 10-base-classes
1 #! /bin/bash
2
3 # do only execute if this is called on the client being installed. Do not use during fai-diskimage
4 if [ X$FAI_ACTION = Xinstall -a $do_init_tasks -eq 0 ]; then
5 exit 0
6 fi
7
8 # Echo architecture
9 command -v dpkg >&/dev/null && dpkg --print-architecture | tr a-z A-Z
10
11 # determin if we are a DHCP client or not
12 # count the : chars in the argument of ip=
13 n="${ip//[^:]}"
14 if [[ $ip =~ ^(on|any|dhcp)$ ]]; then
15 echo DHCPC
16 elif [ ${#n} -lt 6 ]; then
17 echo DHCPC
18 fi
19
20 exit 0