[packages] ddns-scripts: add an option to specify the used interface - default to...
[openwrt/svn-archive/archive.git] / net / ddns-scripts / files / usr / lib / ddns / dynamic_dns_functions.sh
index 19effeffae72b872acb10cfd71ee8997842f6bce..ba18c8b1c4a852b8d6fbe8dbc77af315c50e04a4 100644 (file)
@@ -110,6 +110,8 @@ verbose_echo()
 
 start_daemon_for_all_ddns_sections()
 {
+       local event_interface="$1"
+
        SECTIONS=""
        config_cb() 
        {
@@ -119,6 +121,9 @@ start_daemon_for_all_ddns_sections()
 
        for section in $SECTIONS
        do
+               local iface
+               config_get iface "$section" interface "wan"
+               [ "$iface" = "$event_interface" ] || continue
                /usr/lib/ddns/dynamic_dns_updater.sh $section 0 > /dev/null 2>&1 &
        done
 }