Created
June 29, 2014 03:27
-
-
Save buonzz/ed9171cad2c8d4b3b2c4 to your computer and use it in GitHub Desktop.
avoid the nameserver to get overwritten when rebooted on centos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This script will be executed *after* all the other init scripts. | |
# You can put your own initialization stuff in here if you don't | |
# want to do the full Sys V style init stuff. | |
touch /var/lock/subsys/local | |
# add this two lines to overwrite the nameserver value | |
echo "nameserver 8.8.8.8" > /etc/resolv.conf | |
echo "nameserver 8.8.4.4" >> /etc/resolv.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment