Skip to content

Commit

Permalink
Restart dhcp client after setting hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
bencord0 committed Apr 14, 2014
1 parent c7f9002 commit 5dc5c70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cloud-init.start
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function _file_config {
echo "HOSTNAME=\"$HOSTNAME\"" > /etc/conf.d/hostname
echo "$HOSTNAME" > /etc/hostname
/etc/init.d/hostname restart || hostnamectl set-hostname "$HOSTNAME"
/etc/init.d/dhcpcd restart || systemctl restart dhcpcd
}

test -f "/etc/local.d/openssh-key" && {
Expand Down

0 comments on commit 5dc5c70

Please sign in to comment.