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

mail at adrianschmutzler.de mail at adrianschmutzler.de
Fr Mai 31 22:22:24 CEST 2019


Okay, Patch kann dann weg.

 

From: franken-dev [mailto:franken-dev-bounces at freifunk.net] On Behalf Of Fabian Bläse
Sent: Freitag, 31. Mai 2019 18:47
To: Adrian Schmutzler <freifunk at adrianschmutzler.de>; franken-dev at freifunk.net
Subject: Re: [RFC PATCH] fff-config: Remove migration script from V1 to V2

 

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 <mailto: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 <mailto:system. at system[0].hostname> ") 
> -     UPGRADE_description=$(uci -q get "system. at system[0].description <mailto:system. at system[0].description> ") 
> -     UPGRADE_latitude=$(uci -q get "system. at system[0].latitude <mailto:system. at system[0].latitude> ") 
> -     UPGRADE_longitude=$(uci -q get "system. at system[0].longitude <mailto:system. at system[0].longitude> ") 
> -     UPGRADE_position_comment=$(uci -q get "system. at system[0].position_comment <mailto:system. at system[0].position_comment> ") 
> -     UPGRADE_contact=$(uci -q get "system. at system[0].contact <mailto: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 HTML-Daten wurde abgetrennt...
URL: <https://{'listname': 'franken-dev-freifunk.net', 'hostname': 'lists.freifunk.net'}/pipermail/franken-dev-freifunk.net/attachments/20190531/fa309694/attachment.html>
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : openpgp-digital-signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 834 bytes
Beschreibung: nicht verfügbar
URL         : <https://{'listname': 'franken-dev-freifunk.net', 'hostname': 'lists.freifunk.net'}/pipermail/franken-dev-freifunk.net/attachments/20190531/fa309694/attachment.sig>


Mehr Informationen über die Mailingliste franken-dev