On 27.10.2010 14:13, Bastian Bittorf wrote:
If an already running DHCP-server is found on
the configured interface, the init-script refuses
to start, but does not give a hint why. It took us
some days to track down this behavior in our MANET,
where every wifi/adhoc-node runs it own DHCP-server.
Now syslog is more verbose on this.

Signed-off-by: Bastian Bittorf<bitt...@bluebottle.com>


dnsmasq.init.patch


Index: package/dnsmasq/files/dnsmasq.init
===================================================================
--- package/dnsmasq/files/dnsmasq.init  (Revision 23650)
+++ package/dnsmasq/files/dnsmasq.init  (Arbeitskopie)
@@ -283,7 +283,12 @@
        #check for an already active dhcp server on the interface, unless 
'force' is set
        config_get_bool force "$cfg" force 0
        [ $force -gt 0 ] || {
-               udhcpc -n -q -s /bin/true -t 1 -i $ifname>&-&&  return 0
+               udhcpc -n -q -s /bin/true -t 1 -i $ifname>&-&&  {
+                       logger -t dnsmasq \
+                               "found already running DHCP-server on interface 
'$ifname'" \
+                               "refusing to start, use 'option force 1' to 
override"
+                       return 0

shouldn't it return something else than 0 in case of an error?

..ede
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to