mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-12 21:55:38 +00:00
ubox: fix broken deferred start of logfile writer
Just use 'start' action which will have the desired effect instead of trying to introduce a 'start_file' action which didn't work that way because procd jshn magic would have to wrap around it. Fixes: 88baf6ce2c ("ubox: only start log to file when filesystem has been mounted") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
9ba7a83425
commit
b6a2cee4b7
@ -9,8 +9,6 @@ PIDCOUNT=0
|
|||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
PROG=/sbin/logread
|
PROG=/sbin/logread
|
||||||
|
|
||||||
extra_command "start_file" "Start writing to log file"
|
|
||||||
|
|
||||||
validate_log_section()
|
validate_log_section()
|
||||||
{
|
{
|
||||||
uci_load_validate system system "$1" "$2" \
|
uci_load_validate system system "$1" "$2" \
|
||||||
@ -90,7 +88,7 @@ start_service_remote()
|
|||||||
|
|
||||||
register_mount_trigger()
|
register_mount_trigger()
|
||||||
{
|
{
|
||||||
[ -n "${log_file}" ] && procd_add_action_mount_trigger start_file "${log_file}"
|
[ -n "${log_file}" ] && procd_add_action_mount_trigger start "${log_file}"
|
||||||
}
|
}
|
||||||
|
|
||||||
service_triggers()
|
service_triggers()
|
||||||
@ -109,12 +107,6 @@ start_service()
|
|||||||
config_foreach validate_log_section system start_service_remote
|
config_foreach validate_log_section system start_service_remote
|
||||||
}
|
}
|
||||||
|
|
||||||
start_file()
|
|
||||||
{
|
|
||||||
config_load system
|
|
||||||
config_foreach validate_log_section system start_service_file
|
|
||||||
}
|
|
||||||
|
|
||||||
boot() {
|
boot() {
|
||||||
_BOOT=1 start
|
_BOOT=1 start
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user