From: Marc Fiuczynski Date: Fri, 25 Jan 2008 21:04:16 +0000 (+0000) Subject: I clearly misunderstood how we were configured /etc/hosts before; reverting to settin... X-Git-Tag: myplc-4.2-2~5 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=dd1b3ead87960bb3e9f0b5582711a0b0c2abd601;p=myplc.git I clearly misunderstood how we were configured /etc/hosts before; reverting to setting up /etc/hosts that resembles what we had before I started to muck around with it today --- diff --git a/plc.d/network b/plc.d/network index 3022e39..6fac27b 100755 --- a/plc.d/network +++ b/plc.d/network @@ -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