diff options
| author | Roy Marples <roy@marples.name> | 2014-03-03 15:48:07 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2014-03-03 15:48:07 +0000 |
| commit | cb8d2c35cc5f0c6907a419ec497165d9a60f238d (patch) | |
| tree | 52da9f0730fd403975d25878fcf04ef4456b1da1 /configure | |
| parent | 738e7820b01ed45c6422aece0364a6b86b10f3ba (diff) | |
| download | dhcpcd-cb8d2c35cc5f0c6907a419ec497165d9a60f238d.tar.xz | |
Fudge deriving os from Debian style
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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" |
