summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-03-03 15:48:07 +0000
committerRoy Marples <roy@marples.name>2014-03-03 15:48:07 +0000
commitcb8d2c35cc5f0c6907a419ec497165d9a60f238d (patch)
tree52da9f0730fd403975d25878fcf04ef4456b1da1 /configure
parent738e7820b01ed45c6422aece0364a6b86b10f3ba (diff)
downloaddhcpcd-cb8d2c35cc5f0c6907a419ec497165d9a60f238d.tar.xz
Fudge deriving os from Debian style
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 12 insertions, 4 deletions
diff --git a/configure b/configure
index 5cf08689..52ce5b0d 100755
--- a/configure
+++ b/configure
@@ -196,20 +196,21 @@ if [ -z "$TARGET" ]; then
fi
if [ -z "$OS" ]; then
- # Derive OS from cpu-vendor-os-kernel
+ # Derive OS from cpu-vendor-[kernel-]os
CPU=${TARGET%%-*}
REST=${TARGET#*-}
if [ "$CPU" != "$REST" ]; then
VENDOR=${REST%%-*}
REST=${REST#*-}
if [ "$VENDOR" != "$REST" ]; then
- OS=${REST%%-*}
+ KERNEL=${REST%%-*}
REST=${REST#*-}
- if [ "$OS" != "$REST" ]; then
+ if [ "$KERNEL" != "$REST" ]; then
# 4 tupple
- KERNEL=${REST%%-*}
+ OS=${REST%%-*}
else
# 3 tupple
+ OS=$KERNEL
KERNEL=
fi
else
@@ -218,6 +219,13 @@ if [ -z "$OS" ]; then
VENDOR=
fi
fi
+
+ # Work with cpu-kernel-os, ie Debian
+ if [ "$VENDOR" = linux ]; then
+ KERNEL=$OS
+ OS=linux
+ VENDOR=
+ fi
fi
echo "Configuring dhcpcd for ... $OS"