]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Handle building with script support enabled and DHCP disabled.
authorSimon Kelley <simon@thekelleys.org.uk>
Wed, 6 Jan 2016 17:59:13 +0000 (17:59 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Wed, 6 Jan 2016 17:59:13 +0000 (17:59 +0000)
src/dnsmasq.c

index 4ab56f1610750f16ef2afb86a369406f3aa906c3..5cbfdbdf28cf1d03d95e50308107ee3225852c3b 100644 (file)
@@ -919,7 +919,10 @@ int main (int argc, char **argv)
       poll_listen(piperead, POLLIN);
 
 #ifdef HAVE_SCRIPT
+#    ifdef HAVE_DHCP
       while (helper_buf_empty() && do_script_run(now)); 
+#    endif
+
       while (helper_buf_empty() && do_arp_script_run());
 
 #    ifdef HAVE_TFTP
@@ -930,7 +933,10 @@ int main (int argc, char **argv)
        poll_listen(daemon->helperfd, POLLOUT);
 #else
       /* need this for other side-effects */
+#    ifdef HAVE_DHCP
       while (do_script_run(now));
+#    endif
+
       while (do_arp_script_run(now));
 
 #    ifdef HAVE_TFTP 
@@ -1312,7 +1318,7 @@ static void async_event(int pipe, time_t now)
          if (daemon->tcp_pids[i] != 0)
            kill(daemon->tcp_pids[i], SIGALRM);
        
-#if defined(HAVE_SCRIPT)
+#if defined(HAVE_SCRIPT) && defined(HAVE_DHCP)
        /* handle pending lease transitions */
        if (daemon->helperfd != -1)
          {