]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fudge deriving os from Debian style
authorRoy Marples <roy@marples.name>
Mon, 3 Mar 2014 15:48:07 +0000 (15:48 +0000)
committerRoy Marples <roy@marples.name>
Mon, 3 Mar 2014 15:48:07 +0000 (15:48 +0000)
configure

index 5cf08689153e30a5c6736aa712a8dc90e9a3c83c..52ce5b0d0753b3674e1b95379aedf1a702e47d9b 100755 (executable)
--- 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"