[RFC PATCH] fff-config: Remove migration script from V1 to V2

Fabian Bläse fabian at blaese.de
Fr Mai 31 18:46:42 CEST 2019


Hallo Adrian,

das Skript tut uns derzeit nicht weh, ich würde es noch einige Zeit drin lassen.

Gruß
Fabian

On 21.03.19 13:57, Adrian Schmutzler wrote:
> 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 <freifunk at adrianschmutzler.de>
> ---
>  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. at system[0].hostname")
> -	UPGRADE_description=$(uci -q get "system. at system[0].description")
> -	UPGRADE_latitude=$(uci -q get "system. at system[0].latitude")
> -	UPGRADE_longitude=$(uci -q get "system. at system[0].longitude")
> -	UPGRADE_position_comment=$(uci -q get "system. at system[0].position_comment")
> -	UPGRADE_contact=$(uci -q get "system. at 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
> 

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 833 bytes
Beschreibung: OpenPGP digital signature
URL         : <https://{'listname': 'franken-dev-freifunk.net', 'hostname': 'lists.freifunk.net'}/pipermail/franken-dev-freifunk.net/attachments/20190531/8ee6747d/attachment.sig>


Mehr Informationen über die Mailingliste franken-dev