From dd1b3ead87960bb3e9f0b5582711a0b0c2abd601 Mon Sep 17 00:00:00 2001 From: Marc Fiuczynski Date: Fri, 25 Jan 2008 21:04:16 +0000 Subject: [PATCH] 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 --- plc.d/network | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) 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 -- 2.43.0