Skip to content
Snippets Groups Projects
Commit 32df7e55 authored by Tim Niemeyer's avatar Tim Niemeyer
Browse files

bsp/default: remove/update etc/config/system


- This will fix the LEDs on LEDE
- We will lose the power heartbeat trigger on the LED
- We will lose the VPN signaling on the LEDs

While remove the default system config, the LEDE system now
configures wrong ntp service. We fix this by deleting these
entries in the fff-timeserver package.

If the file is already present on the devices, we need to upgrade it.
Therefore the 05-config-system-migration is now part of the fff-sysupgrade
package.

Signed-off-by: default avatarTim Niemeyer <tim@tn-x.org>
Reviewed-by: default avatarChristian Dresel <fff@chrisi01.de>
Reviewed-by: default avatarJan Kraus <mayosemmel@gmail.com>
parent 33b0fb5e
No related branches found
No related tags found
No related merge requests found
config 'system'
option 'hostname' 'OpenWrt'
option 'timezone' 'CET-1CEST,M3.5.0,M10.5.0/3'
config 'led' 'status_led_green'
option 'name' 'status'
option 'sysfs' 'tp-link:green:system'
option 'trigger' 'heartbeat'
config 'led' 'status_led_blue'
option 'name' 'status'
option 'sysfs' 'tp-link:blue:system'
option 'trigger' 'heartbeat'
config 'led' 'led_vpn_green'
option 'name' 'VPN'
option 'sysfs' 'tp-link:green:qss'
option 'trigger' 'netdev'
option 'dev' '${VPN_PROJECT}VPN'
option 'mode' 'link'
config 'led' 'led_vpn_blue'
option 'name' 'VPN'
option 'sysfs' 'tp-link:blue:qss'
option 'trigger' 'netdev'
option 'dev' '${VPN_PROJECT}VPN'
option 'mode' 'link'
# vim: noexpandtab
\ No newline at end of file
#!/bin/sh
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")
/bin/rm -rf /etc/config/system
/bin/config_generate
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
......@@ -4,3 +4,7 @@
. /etc/community.cfg
setTimeserver "${NTPD_IP}"
uci -q set "system.@system[0].timezone=CET-1CEST,M3.5.0,M10.5.0/3"
uci -q commit system
......@@ -12,6 +12,7 @@ setTimeserver() {
local ntp=$1
uci batch <<-__EOF__
delete system.ntp
set system.ntp='timeserver'
add_list system.ntp.server='$ntp'
set system.ntp.enable_server='0'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment