From fc7cd560319c947068c1238b578f573836ba45d9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 23 Feb 2014 17:35:56 +0100 Subject: [PATCH] gluon-legacy: gluon-mesh-vpn-fastd: correctly set enabled state --- .../upgrade/mesh-vpn-fastd/legacy/010-reset-fastd-config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/gluon-legacy/generate/lib/gluon/upgrade/mesh-vpn-fastd/legacy/010-reset-fastd-config b/package/gluon-legacy/generate/lib/gluon/upgrade/mesh-vpn-fastd/legacy/010-reset-fastd-config index 58d4acf9..01818ec7 100755 --- a/package/gluon-legacy/generate/lib/gluon/upgrade/mesh-vpn-fastd/legacy/010-reset-fastd-config +++ b/package/gluon-legacy/generate/lib/gluon/upgrade/mesh-vpn-fastd/legacy/010-reset-fastd-config @@ -4,11 +4,13 @@ SECRET= +ENABLED= for config in @legacy.fastd_configs@; do if [ -z "$SECRET" ]; then SECRET="$(uci_get fastd "$config" secret)" + ENABLED="$(uci_get fastd "$config" enabled)" fi uci_remove fastd "$config" @@ -17,6 +19,10 @@ done if [ -n "$SECRET" ]; then uci_add fastd fastd 'mesh_vpn' uci_set fastd 'mesh_vpn' 'secret' "$SECRET" + + if [ "$ENABLED" = 1 ]; then + uci_set fastd 'mesh_vpn' 'enabled' '1' + fi fi uci_commit fastd