Hi,
When adding an interface trigger to sysntpd, the trigger won't work when
another trigger is present(in this case a reload trigger for system).
below is the service_triggers function I used for sysntpd:

service_triggers()
{
    local script=$(readlink "$initscript")
    local name=$(basename ${script:-$initscript})

    procd_open_trigger
    procd_add_raw_trigger "interface.*" 2000 /etc/init.d/$name reload
    procd_close_trigger

    procd_add_reload_trigger "system"
    procd_add_validation validate_ntp_section
}

For testing I added a logger msg in start_service and tested by restarting
the network service or unplugging a cable(once with system reload trigger
and another without).

Can anyone confirm this behaviour and explain if it is intended?
Thanks.
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to