X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fnetwork;h=6fac27b56b2b46eea88d6792c88d089c99568b4d;hb=dd1b3ead87960bb3e9f0b5582711a0b0c2abd601;hp=3022e39e7a470bf0ef616504a92dd9d2be79ade7;hpb=b9e18f730a2a05353fd4322d8603b30fe76b59af;p=myplc.git 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