From patchwork Thu Mar 21 12:57:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC] fff-config: Remove migration script from V1 to V2 From: Adrian Schmutzler X-Patchwork-Id: 1036 Message-Id: <20190321125742.1575-1-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Thu, 21 Mar 2019 13:57:42 +0100 In V2, the /etc/config/fff file was introduced. Thus, conversion from the old /etc/config/system was required. Nowadays, where the vast majority of V1 devices are updated, this script can be dropped. This also saves us from the config-recreation performed there. Note: V1 routers updated after that should use sysupgrade -n, as otherwise the old /etc/config/system will remain until the next update. Signed-off-by: Adrian Schmutzler --- src/packages/fff/fff-config/Makefile | 3 +-- .../etc/uci-defaults/05-config-system-migration | 27 ---------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 src/packages/fff/fff-config/files/etc/uci-defaults/05-config-system-migration diff --git a/src/packages/fff/fff-config/Makefile b/src/packages/fff/fff-config/Makefile index 89bdc93d..0ea4a798 100644 --- a/src/packages/fff/fff-config/Makefile +++ b/src/packages/fff/fff-config/Makefile @@ -1,8 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-config -PKG_VERSION:=1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/src/packages/fff/fff-config/files/etc/uci-defaults/05-config-system-migration b/src/packages/fff/fff-config/files/etc/uci-defaults/05-config-system-migration deleted file mode 100644 index fe4ad978..00000000 --- a/src/packages/fff/fff-config/files/etc/uci-defaults/05-config-system-migration +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -if [ ! -s /etc/config/fff ] ; then - - UPGRADE_hostname=$(uci -q get "system.@system[0].hostname") - UPGRADE_description=$(uci -q get "system.@system[0].description") - UPGRADE_latitude=$(uci -q get "system.@system[0].latitude") - UPGRADE_longitude=$(uci -q get "system.@system[0].longitude") - UPGRADE_position_comment=$(uci -q get "system.@system[0].position_comment") - UPGRADE_contact=$(uci -q get "system.@system[0].contact") - - /bin/rm -rf /etc/config/system - - /bin/config_generate - - touch /etc/config/fff - - uci -q set fff.system=fff - test -n "${UPGRADE_hostname}" && uci -q set "fff.system.hostname=${UPGRADE_hostname}" - test -n "${UPGRADE_description}" && uci -q set "fff.system.description=${UPGRADE_description}" - test -n "${UPGRADE_latitude}" && uci -q set "fff.system.latitude=${UPGRADE_latitude}" - test -n "${UPGRADE_longitude}" && uci -q set "fff.system.longitude=${UPGRADE_longitude}" - test -n "${UPGRADE_position_comment}" && uci -q set "fff.system.position_comment=${UPGRADE_position_comment}" - test -n "${UPGRADE_contact}" && uci -q set "fff.system.contact=${UPGRADE_contact}" - - uci -q commit fff -fi