update to 8474747c7f55
[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 and OS name in uppercase. Do NOT remove these two lines.
9 uname -s | tr '[:lower:]' '[:upper:]'
10 command -v dpkg >&/dev/null && dpkg --print-architecture | tr a-z A-Z
11
12 # determin if we are a DHCP client or not
13 # count the : chars in the argument of ip=
14 n="${ip//[^:]}"
15 if [[ $ip =~ ^(on|any|dhcp)$ ]]; then
16 echo DHCPC
17 elif [ ${#n} -lt 6 ]; then
18 echo DHCPC
19 fi
20
21 exit 0