I clearly misunderstood how we were configured /etc/hosts before; reverting to settin...
Marc Fiuczynski [Fri, 25 Jan 2008 21:04:16 +0000 (21:04 +0000)]
plc.d/network

index 3022e39..6fac27b 100755 (executable)
@@ -38,17 +38,11 @@ case "$1" in
                fi
            done
        ) > $hfile
-       if [ $PLC_DNS_ENABLED -eq 1 ] ; then
-           target=/etc/plc_hosts
-           sort -u $hfile > $target
-       else
-           target=/etc/hosts
-           cat /etc/hosts >> $hfile
-           echo "#generated by /etc/plc.d/network" >/etc/hosts
-           echo "127.0.0.1     localhost.localdomain localhost" >>/etc/hosts
-           sort -u $hfile >> /etc/hosts
-       fi
-       chmod +r $target
+       grep -v "^#" /etc/hosts >> $hfile
+       echo "#generated by /etc/plc.d/network" >/etc/hosts
+       echo "127.0.0.1 localhost.localdomain localhost" >> $hfile
+       sort -u $hfile >> /etc/hosts
+       chmod +r /etc/hosts
        rm -f $hfile
 
        # Set up nameservers