Prevent resolv.conf from changing

This commit is contained in:
Bob Mottram 2016-04-22 09:42:17 +01:00
parent 592311f21e
commit a2eaf0d865
1 changed files with 64 additions and 60 deletions

View File

@ -3952,6 +3952,10 @@ function configure_dns {
echo 'search localdomain' >> /etc/resolv.conf echo 'search localdomain' >> /etc/resolv.conf
echo "nameserver $NAMESERVER1" >> /etc/resolv.conf echo "nameserver $NAMESERVER1" >> /etc/resolv.conf
echo "nameserver $NAMESERVER2" >> /etc/resolv.conf echo "nameserver $NAMESERVER2" >> /etc/resolv.conf
# prevent resolv.conf from changing
chattr +i /etc/resolv.conf
echo 'configure_dns' >> $COMPLETION_FILE echo 'configure_dns' >> $COMPLETION_FILE
} }