Created
February 26, 2016 05:45
-
-
Save ssmythe/e9a351b6005fdfd62053 to your computer and use it in GitHub Desktop.
Fixes /etc/dhcp/dhclient.conf when using base centos6 build script when hostname is localhost
This file contains hidden or 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
#!/usr/bin/env bash | |
echo "patch: patching /etc/dhcp/dhclient.conf" | |
sed -i "s/localhost/$(hostname)/g" /etc/dhcp/dhclient.conf | |
/sbin/service network restart | |
echo "patch: display hostname FQDN" | |
hostname -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment