deleted file mode 100755
@@ -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.@system[0].hostname")
- UPGRADE_description=$(uci -q get "fff.@system[0].description")
- UPGRADE_latitude=$(uci -q get "fff.@system[0].latitude")
- UPGRADE_longitude=$(uci -q get "fff.@system[0].longitude")
- UPGRADE_position_comment=$(uci -q get "fff.@system[0].position_comment")
- UPGRADE_contact=$(uci -q get "fff.@system[0].contact")
-
- test -n "${UPGRADE_hostname}" && uci -q set "system.@system[0].hostname=${UPGRADE_hostname}"
- test -n "${UPGRADE_description}" && uci -q set "system.@system[0].description=${UPGRADE_description}"
- test -n "${UPGRADE_latitude}" && uci -q set "system.@system[0].latitude=${UPGRADE_latitude}"
- test -n "${UPGRADE_longitude}" && uci -q set "system.@system[0].longitude=${UPGRADE_longitude}"
- test -n "${UPGRADE_position_comment}" && uci -q set "system.@system[0].position_comment=${UPGRADE_position_comment}"
- test -n "${UPGRADE_contact}" && uci -q set "system.@system[0].contact=${UPGRADE_contact}"
-
- uci -q commit system
-
-fi
new file mode 100755
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if ! grep -q '/etc/config/system' /etc/sysupgrade.conf 2> /dev/null ; then
+ echo "/etc/config/system" >> /etc/sysupgrade.conf
+fi
+
+if [ -s /etc/config/fff ] ; then
+
+ UPGRADE_hostname=$(uci -q get "fff.@system[0].hostname")
+ UPGRADE_description=$(uci -q get "fff.@system[0].description")
+ UPGRADE_latitude=$(uci -q get "fff.@system[0].latitude")
+ UPGRADE_longitude=$(uci -q get "fff.@system[0].longitude")
+ UPGRADE_position_comment=$(uci -q get "fff.@system[0].position_comment")
+ UPGRADE_contact=$(uci -q get "fff.@system[0].contact")
+
+ test -n "${UPGRADE_hostname}" && uci -q set "system.@system[0].hostname=${UPGRADE_hostname}"
+ test -n "${UPGRADE_description}" && uci -q set "system.@system[0].description=${UPGRADE_description}"
+ test -n "${UPGRADE_latitude}" && uci -q set "system.@system[0].latitude=${UPGRADE_latitude}"
+ test -n "${UPGRADE_longitude}" && uci -q set "system.@system[0].longitude=${UPGRADE_longitude}"
+ test -n "${UPGRADE_position_comment}" && uci -q set "system.@system[0].position_comment=${UPGRADE_position_comment}"
+ test -n "${UPGRADE_contact}" && uci -q set "system.@system[0].contact=${UPGRADE_contact}"
+
+ uci -q commit system
+
+fi