I've stumbled upon a small hick-up during an snapshot update and reboot with my previous modifications.
After a system reboot the boot-time-update-check won't find an ntpserver ip because of the dsnmasq "localhost" modifications done earlier.
Time update check is done before dnsmasq has loaded. So I "restored" the original symlink before time update check is run.
Didn't try moving dnsmasq startup before time update check though, so I don't know if that will work too.
Symbolic links are not "repaired" when the exist…
/etc/rc only checks if the links exist and recreates them if they are missing, it does not repair them like the comments state...
the following is only a small part of /etc/rc :
echo -n "Creating symlinks..."
# Make sure symlink is correct on embedded
if [ "$PLATFORM" = "embedded" ] ; then
rm /conf
ln -s /cf/conf/ /conf
fi
# Repair symlinks if they are broken
if [ ! -L /etc/syslog.conf ]; then
rm -rf /etc/syslog.conf
ln -s /var/etc/syslog.conf /etc/syslog.conf
fi
# Repair symlinks if they are broken
if [ ! -L /etc/hosts ]; then
rm -rf /etc/hosts
ln -s /var/etc/hosts /etc/hosts
fi
# Repair symlinks period!!!
if [ ! -L /etc/resolv.conf]; then
rm -rf /etc/resolv.conf
ln -s /var/etc/resolv.conf /etc/resolv.conf
else
#make sure the link is pointing to the right conf file for startup reasons ( -f )
ln -f -s /var/etc/resolv.conf /etc/resolv.conf
fi
the following is only a small part of /etc/rc.bootup :
/* start DHCP service */
services_dhcpd_configure();
/* create correct symbolic link for using dnsmasq as forwarder and local cache!!! */
mwexec("/bin/ln -f -s /var/etc/resolv.dnsmasq /etc/resolv.conf");
/* start dnsmasq service */
services_dnsmasq_configure();
side note, people who want OpenDNS and ISP's DNSservers (dhcp) add two lines in to /etc/inc/system.inc like so:
function system_resolvconf_generate($dynupdate = false) {
global $config, $g;
if(isset($config['system']['developerspew'])) {
$mt = microtime();
echo "system_resolvconf_generate() being called $mt\n";
}
$syscfg = $config['system'];
$fd = fopen("{$g['varetc_path']}/resolv.conf", "w");
if (!$fd) {
printf("Error: cannot open resolv.conf in system_resolvconf_generate().\n");
return 1;
}
$resolvconf = "domain {$syscfg['domain']}\n";
/* Add OpenDNS to the list of nameservers */
$resolvconf .= "nameserver 208.67.222.222\n";
$resolvconf .= "nameserver 208.67.220.220\n";
$havedns = false;
if (isset($syscfg['dnsallowoverride'])) {
/* get dynamically assigned DNS servers (if any) */
$ns = array_unique(get_nameservers());
foreach($ns as $nameserver) {
if($nameserver) {
$resolvconf .= "nameserver $nameserver\n";
$havedns = true;
}
}
}
if (!$havedns && is_array($syscfg['dnsserver'])) {
foreach ($syscfg['dnsserver'] as $ns) {
if ($ns) {
$resolvconf .= "nameserver $ns\n";
$havedns = true;
}
}
}
fwrite($fd, $resolvconf);
fclose($fd);