Skip to content

Commit 34fc1aa

Browse files
committed
chore: set hostname in dhcp client
1 parent 2105652 commit 34fc1aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ebssurrogate/scripts/chroot-bootstrap-nix.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ function disable_fsck {
157157

158158
# Don't request hostname during boot but set hostname
159159
function setup_hostname {
160-
sed -i 's/gethostname()/ubuntu /g' /etc/dhcp/dhclient.conf
161-
sed -i 's/host-name,//g' /etc/dhcp/dhclient.conf
160+
sudo sed -i 's/hostname: .*/hostname: "ubuntu"/g' /etc/netplan/*.yaml
162161
echo "ubuntu" > /etc/hostname
163162
chmod 644 /etc/hostname
164163
}

0 commit comments

Comments
 (0)