eed0846e2e8f47971a78361847abc0f6280cc1d6
[automated-distro-installer] / fai / config / class / 10-base-classes
1 #! /bin/bash
2
3 # Echo architecture and OS name in uppercase. Do NOT remove these two lines.
4 uname -s | tr '[:lower:]' '[:upper:]'
5 [ -x "`which dpkg`" ] && dpkg --print-architecture | tr a-z A-Z
6
7 # determin if we are a DHCP client or not
8 # count the : chars in the argument of ip=
9 n="${ip//[^:]}"
10 if [[ $ip =~ ^(on|any|dhcp)$ ]]; then
11 echo DHCPC
12 elif [ ${#n} -lt 6 ]; then
13 echo DHCPC
14 fi
15
16 exit 0