base-files: also generate configs when current is empty (FS#193)
authorKoen Vandeputte <koen.vandeputte@ncentric.com>
Wed, 5 Oct 2016 09:26:35 +0000 (11:26 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 5 Oct 2016 17:59:11 +0000 (19:59 +0200)
commit0f27096100a33421bff0d4539d428fe393eebe22
tree76f6304d3a0df849d76a123dafc93c9254c102f0
parent7659f9ad9e5d6ffea93bd73989535346f0b14131
base-files: also generate configs when current is empty (FS#193)

Before a configuration is generated, an empty file is created to store
it in. (required by UCI)

If something happens during config generation
(power cut, interruption, ..) an empty file exists and it is never
regenerated again, causing some daemons to fail starting
(NTPD, logread, ..)

Fix this by also generating new configs if a critical file
is empty.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
package/base-files/files/bin/board_detect
package/base-files/files/bin/config_generate