Dns forwarder not working .. bug ? in /etc/inc/services.inc



  • Bug in services.inc for BETA4 ?

    my dns forwarder can't seem start..

    did a look in the sources and  managed to solve it in /etc/inc/services.inc

    changed the line

    if (isset($dnsmasq['dnsmasq']['enable'])) {

    to

    if (isset($config['dnsmasq']['enable'])) {

    .. and all the changes in bold

    if (isset($config['dnsmasq']['enable'])) {
                    if ($g['booting'])
                            echo "Starting DNS forwarder… ";
                    else
                            sleep(1);

    /* generate hosts file */
                    system_hosts_generate();
                    $args = "";

    if (isset($config['dnsmasq']['regdhcp'])) {
                            $args .= " -l {$g['dhcpd_chroot_path']}/var/db/dhcpd.leases" .
                                    " -s {$config['system']['domain']}";
                    }

    if (isset($config['dnsmasq']['domainoverrides']) && is_array($config['dnsmasq']['domainoverrides'])) {
                            foreach($config['dnsmasq']['domainoverrides'] as $override) {
                                    $args .= ' –server=/' . $override['domain'] . '/' . $override['ip'];
                            }
                    }

    /* run dnsmasq */
                    mwexec("/usr/local/sbin/dnsmasq {$args}");

    if ($g['booting'])
                            echo "done.\n";

    }

    is this a bug? or is <dnsmasq>in config.xml supposed to fall under <interfaces>?</interfaces></dnsmasq>



  • If you are running a full install run a "cvs_syn.sh RELENG_1" from the shell (and be patient, it takes some time). Reboot after that. Not sure where your problem is but I never have heard from this bug before and beta4 is rather old though the latest official build on the mirrors. RC1 should be released in the near future.



  • I am not sure where you are finding this code but in my /etc/inc/services.inc it shows:

    if (isset($config['dnsmasq']['enable'])) {

    if ($g['booting'])
    echo "Starting DNS forwarder… ";
    else
    sleep(1);

    /* generate hosts file */
    system_hosts_generate();

    $args = "";

    if (isset($config['dnsmasq']['regdhcp'])) {

    Notice it uses $config already.

    Why is your code different?



  • @sullrich:

    I am not sure where you are finding this code but in my /etc/inc/services.inc it shows:

    if (isset($config['dnsmasq']['enable'])) {

    if ($g['booting'])
    echo "Starting DNS forwarder… ";
    else
    sleep(1);

    /* generate hosts file */
    system_hosts_generate();

    $args = "";

    if (isset($config['dnsmasq']['regdhcp'])) {

    Notice it uses $config already.

    Why is your code different?

    Because he's running HEAD.  Same issue with dnsmasq I bitched about, but haven't fixed cause it was part of the multi-interface code you were writing and I didn't feel like either backing out the broken code or finishing the implementation :)

    Guess I'll file a ticket against HEAD though as a placeholder for this bug.

    –Bill



  • To the original poster:  I am sure you know the rules of running -HEAD.  We are terminating this thread now.


Log in to reply