aboutsummaryrefslogtreecommitdiff
path: root/class/10-base-classes
blob: eed0846e2e8f47971a78361847abc0f6280cc1d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/bash

# Echo architecture and OS name in uppercase. Do NOT remove these two lines.
uname -s | tr '[:lower:]' '[:upper:]'
[ -x "`which dpkg`" ] && dpkg --print-architecture | tr a-z A-Z

# determin if we are a DHCP client or not
# count the : chars in the argument of ip=
n="${ip//[^:]}"
if [[ $ip =~ ^(on|any|dhcp)$ ]]; then
    echo DHCPC
elif [ ${#n} -lt 6 ]; then
    echo DHCPC
fi

exit 0