From patchwork Wed Jul 19 18:52:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fff-network: Prevent resetting network config on each reboot From: Adrian Schmutzler X-Patchwork-Id: 386 Message-Id: <1500490370-23723-1-git-send-email-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Cc: Adrian Schmutzler Date: Wed, 19 Jul 2017 20:52:50 +0200 This only sets the switch configs if they are not set yet. If the network.* file is edited, add FORCEPARSE=1 to apply the changes. Fixes #56 Signed-off-by: Adrian Schmutzler --- src/packages/fff/fff-network/files/usr/sbin/configurenetwork | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork index 63b216a..6819d3e 100755 --- a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork +++ b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork @@ -12,7 +12,7 @@ BOARD="$(uci get board.model.name)" . /etc/network.$BOARD -if ! uci get network.$SWITCHDEV.ifname; then +if ! uci -q get network.$SWITCHDEV.name || [ "$FORCEPARSE" = '1' ] ; then SWITCHHW=$(swconfig list | awk '{ print $4 }')