[LEDE-DEV] [PATCH 2/2] base-files: fix config storing on generation
Koen Vandeputte
koen.vandeputte at ncentric.com
Fri Sep 30 07:25:18 PDT 2016
On 2016-09-30 15:56, Felix Fietkau wrote:
> On 2016-09-30 15:10, Koen Vandeputte wrote:
>> On 2016-09-30 15:00, Felix Fietkau wrote:
>>> On 2016-09-30 14:57, Koen Vandeputte wrote:
>>>> On 2016-09-30 14:31, Felix Fietkau wrote:
>>>>> On 2016-09-30 09:48, Koen Vandeputte wrote:
>>>>>> The general "uci commit" does NOT store the generated sections.
>>>>>>
>>>>>> Fix this for now by storing each part separately.
>>>>> I'd prefer getting the real bug fixed instead of just working around it
>>>>> like this.
>>>> I totally agree, but the main intent was to have at least some temporary
>>>> solution until the real bug is fixed.
>>>> Without this temp fix, a device will regenerate the configs on each boot.
>>>>
>>>> If this consequence is OK for you, then I totally agree with rejection.
>>> I've never seen this bug in my own tests so far. What device did you
>>> reproduce it on?
>> Gateworks laguna (cns3xxx)
>>
>> When flashing a fresh image (not sysupgrade), no 'system' config file is
>> present in /etc/config
> Also when you use sysupgrade -n?
yes, same behaviour
>> So the file gets touched (empty) and the config gets generated as
>> expected (confirmed with 'uci show system')
>>
>> However,
>> - After the initial generation the 'system' file remains empty (also
>> when executing 'uci commit' manually afterwards)
>> - it only gets filled when manually executing 'uci commit system'
> I can't reproduce this on my GW2391
fyi, I'm testing on gw2388-4
Can you confirm you did this:
- rm /etc/config/system
- reboot
... booting ...
- cat /etc/config/system
--> content is present?
Here is my output when doing the steps above:
[ node-3 ] cat /etc/config/system
[ node-3 ] uci show system
system. at system[0]=system
system. at system[0].hostname='lede'
system. at system[0].timezone='UTC'
system. at system[0].ttylogin='0'
system. at system[0].log_size='64'
system. at system[0].urandom_seed='0'
system.ntp=timeserver
system.ntp.enabled='1'
system.ntp.enable_server='0'
system.ntp.server='0.lede.pool.ntp.org' '1.lede.pool.ntp.org'
'2.lede.pool.ntp.org' '3.lede.pool.ntp.org'
system. at led[0]=led
system. at led[0].default='0'
system. at led[0].name='heartbeat'
system. at led[0].sysfs='user1'
system. at led[0].trigger='heartbeat'
[ node-3 ] uci commit
[ node-3 ] cat /etc/config/system
[ node-3 ] uci commit system
[ node-3 ] cat /etc/config/system
config system
option hostname 'lede'
option timezone 'UTC'
option ttylogin '0'
option log_size '64'
option urandom_seed '0'
config timeserver 'ntp'
option enabled '1'
option enable_server '0'
list server '0.lede.pool.ntp.org'
list server '1.lede.pool.ntp.org'
list server '2.lede.pool.ntp.org'
list server '3.lede.pool.ntp.org'
config led
option default '0'
option name 'heartbeat'
option sysfs 'user1'
option trigger 'heartbeat'
[ node-3 ]
> - Felix
>
--
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158
More information about the Lede-dev
mailing list