mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
0f27096100
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>
15 lines
204 B
Bash
Executable File
15 lines
204 B
Bash
Executable File
#!/bin/sh
|
|
|
|
CFG=$1
|
|
|
|
[ -n "$CFG" ] || CFG=/etc/board.json
|
|
|
|
[ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
|
|
for a in `ls /etc/board.d/*`; do
|
|
[ -x $a ] || continue;
|
|
$(. $a)
|
|
done
|
|
}
|
|
|
|
[ -s "$CFG" ] || return 1
|