[RFC PATCH 12/15] Moved prepare_firmware_downgrade.sh to fff-sysupgrade

Adrian Schmutzler freifunk at adrianschmutzler.de
Mi Jul 26 21:49:00 CEST 2017


Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../ar71xx/usr/sbin/prepare_firmware_downgrade.sh  | 27 ----------------------
 .../files/usr/sbin/prepare_firmware_downgrade.sh   | 27 ++++++++++++++++++++++
 2 files changed, 27 insertions(+), 27 deletions(-)
 delete mode 100755 src/packages/fff/fff-support/ar71xx/usr/sbin/prepare_firmware_downgrade.sh
 create mode 100755 src/packages/fff/fff-sysupgrade/files/usr/sbin/prepare_firmware_downgrade.sh

diff --git a/src/packages/fff/fff-support/ar71xx/usr/sbin/prepare_firmware_downgrade.sh b/src/packages/fff/fff-support/ar71xx/usr/sbin/prepare_firmware_downgrade.sh
deleted file mode 100755
index f8fa0b1..0000000
--- a/src/packages/fff/fff-support/ar71xx/usr/sbin/prepare_firmware_downgrade.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-if ! grep -q '/etc/config/system' /etc/sysupgrade.conf 2> /dev/null ; then
-cat > /etc/sysupgrade.conf <<-__EOF__
-/etc/config/system
-__EOF__
-fi
-
-if [ -s /etc/config/fff ] ; then
-
-	UPGRADE_hostname=$(uci -q get "fff. at system[0].hostname")
-	UPGRADE_description=$(uci -q get "fff. at system[0].description")
-	UPGRADE_latitude=$(uci -q get "fff. at system[0].latitude")
-	UPGRADE_longitude=$(uci -q get "fff. at system[0].longitude")
-	UPGRADE_position_comment=$(uci -q get "fff. at system[0].position_comment")
-	UPGRADE_contact=$(uci -q get "fff. at system[0].contact")
-
-	test -n "${UPGRADE_hostname}" && uci -q set "system. at system[0].hostname=${UPGRADE_hostname}"
-	test -n "${UPGRADE_description}" && uci -q set "system. at system[0].description=${UPGRADE_description}"
-	test -n "${UPGRADE_latitude}" && uci -q set "system. at system[0].latitude=${UPGRADE_latitude}"
-	test -n "${UPGRADE_longitude}" && uci -q set "system. at system[0].longitude=${UPGRADE_longitude}"
-	test -n "${UPGRADE_position_comment}" && uci -q set "system. at system[0].position_comment=${UPGRADE_position_comment}"
-	test -n "${UPGRADE_contact}" && uci -q set "system. at system[0].contact=${UPGRADE_contact}"
-
-	uci -q commit system
-	
-fi
diff --git a/src/packages/fff/fff-sysupgrade/files/usr/sbin/prepare_firmware_downgrade.sh b/src/packages/fff/fff-sysupgrade/files/usr/sbin/prepare_firmware_downgrade.sh
new file mode 100755
index 0000000..f8fa0b1
--- /dev/null
+++ b/src/packages/fff/fff-sysupgrade/files/usr/sbin/prepare_firmware_downgrade.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+if ! grep -q '/etc/config/system' /etc/sysupgrade.conf 2> /dev/null ; then
+cat > /etc/sysupgrade.conf <<-__EOF__
+/etc/config/system
+__EOF__
+fi
+
+if [ -s /etc/config/fff ] ; then
+
+	UPGRADE_hostname=$(uci -q get "fff. at system[0].hostname")
+	UPGRADE_description=$(uci -q get "fff. at system[0].description")
+	UPGRADE_latitude=$(uci -q get "fff. at system[0].latitude")
+	UPGRADE_longitude=$(uci -q get "fff. at system[0].longitude")
+	UPGRADE_position_comment=$(uci -q get "fff. at system[0].position_comment")
+	UPGRADE_contact=$(uci -q get "fff. at system[0].contact")
+
+	test -n "${UPGRADE_hostname}" && uci -q set "system. at system[0].hostname=${UPGRADE_hostname}"
+	test -n "${UPGRADE_description}" && uci -q set "system. at system[0].description=${UPGRADE_description}"
+	test -n "${UPGRADE_latitude}" && uci -q set "system. at system[0].latitude=${UPGRADE_latitude}"
+	test -n "${UPGRADE_longitude}" && uci -q set "system. at system[0].longitude=${UPGRADE_longitude}"
+	test -n "${UPGRADE_position_comment}" && uci -q set "system. at system[0].position_comment=${UPGRADE_position_comment}"
+	test -n "${UPGRADE_contact}" && uci -q set "system. at system[0].contact=${UPGRADE_contact}"
+
+	uci -q commit system
+	
+fi
-- 
2.7.4



Mehr Informationen über die Mailingliste franken-dev