Package: freedombox-setup Version: 0.6 Followup-For: Bug #795103 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
When there is only one wired interface, we always configure it as 'internal' interface. This happens even when there are wireless interfaces available. This patch changes that behavior. When at least one wireless interface is available, we will configure the single wired interface as 'external'. Currently, during first boot, we don't have this case hitting because of lack of proprietary-firmware-free wireless interfaces. However in future, this is a common case for FreedomBox devices to have one wired interface and one wireless interface. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWY8BHAAoJEDbDYUQMm8lxzuMP/1nanwVTbZVaxJ41N2JklvME 2bWaZ9s8AOuh0QQPcGsSVGXcIy6VVizoEDjBsrM8h0yITwUqcbwHYgfRxww4/loK 9vdRgqujVQy559ijSaObZsXl1sr9opezDHmtDIfKpfKueJU0bFqaE2A926VYNWeP Dg7H7bcxxX7F+6v3P55mK23R2KUn5euWdV7/6bv82BaN0dSBTSGWfM4rPHowpRai tXISw8zFiHdREAB5GMytS+EvMTaIgrsCoyLtRgKQKq2aiR5n2SDhyNCvbrnxhdut ZwP0Wco+FHN98fVdLHoyq+SMZro/59xL3J0ESAm24cBkGhOaKOi/ZAvprQKBwsMb Mb6x6SO1A0DemTq21ICKfh/l8AXXUE/OfWm5/5E5kbMPdbj6ejOLNyUEpO5Imc/v buteoA44KB8q2fRPlfHa/gEkFUPN5f2MuBLjumRuz/z1sGeY4emvgaWk/3WvCNFC CPixdD+d7MTVXmCtlCA7uzoT6JbjnS3ht9x5+ktJ4JEEKdvamzqzVcZ4HwU5nf5d NNQFD1gRS99y5/Tf8QXBUo/sGkb8wSdqcjGNW1hsDTHaWKPMAJiqJ1MTQHKpFcfU hY06Oeu+20HMi/aiRi+M2AommWvPnH5CXLAc+blbkqveuzNlME1/s8B/HsTBpR1F tU/EbFn+248OsVP9xOsM =3+kU -----END PGP SIGNATURE-----
>From ef62d3090b739908c4a9c013a1808c37516edd31 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa <su...@medhas.org> Date: Sun, 6 Dec 2015 10:13:47 +0530 Subject: [PATCH] Consider wireless when configuring wired ifaces When there is only one wired interface, we always configure it as 'internal' interface. This happens even when there are wireless interfaces available. This patch changes that behavior. When at least one wireless interface is available, we will configure the single wired interface as 'external'. Currently, during first boot, we don't have this case hitting because of lack of proprietary-firmware-free wireless interfaces. However in future, this is a common case for FreedomBox devices to have one wired interface and one wireless interface. --- first-run.d/05_network | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/first-run.d/05_network b/first-run.d/05_network index 9808715..c9d6162 100755 --- a/first-run.d/05_network +++ b/first-run.d/05_network @@ -10,6 +10,7 @@ function get-interfaces { NO_OF_WIRED_IFACES=$(echo $WIRED_IFACES | wc -w) WIRELESS_IFACES=$(nmcli --terse --fields type,device device | grep "^wifi:" | cut -d: -f2 | sort) + NO_OF_WIRELESS_IFACES=$(echo $WIRELESS_IFACES | wc -w) } function configure-regular-interface { @@ -77,7 +78,15 @@ function multi-wired-setup { function one-wired-setup { interface="$1" - configure-regular-interface "$interface" internal + + case $NO_OF_WIRELESS_IFACES in + "0") + configure-regular-interface "$interface" internal + ;; + *) + configure-regular-interface "$interface" external + ;; + esac } function wireless-setup { -- 2.6.1