[OpenWrt-Devel] Procd: Weird behaviour when adding multiple triggers

Amine Aouled Hamed amine.ahd at gmail.com
Fri Jan 29 05:18:41 EST 2016


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20160129/6f179f26/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list