2017-11-03 15:00:00 +01:00
|
|
|
if [ ! -s /etc/config/fff ] ; then
|
2017-02-17 08:07:05 +01:00
|
|
|
|
2017-11-03 15:00:00 +01:00
|
|
|
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")
|
2017-02-17 08:07:05 +01:00
|
|
|
|
2017-11-03 15:00:00 +01:00
|
|
|
/bin/rm -rf /etc/config/system
|
|
|
|
|
|
|
|
/bin/config_generate
|
2017-02-17 08:07:05 +01:00
|
|
|
|
2017-11-03 15:00:00 +01:00
|
|
|
touch /etc/config/fff
|
2017-02-17 08:07:05 +01:00
|
|
|
|
2017-11-03 15:00:00 +01:00
|
|
|
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
|
2020-04-22 16:32:46 +02:00
|
|
|
|
|
|
|
exit 0
|