Skip to content

Commit 197b513

Browse files
committed
chore: conform to new networking approach
1 parent 34fc1aa commit 197b513

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ebssurrogate/scripts/chroot-bootstrap-nix.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,12 @@ function disable_fsck {
157157

158158
# Don't request hostname during boot but set hostname
159159
function setup_hostname {
160-
sudo sed -i 's/hostname: .*/hostname: "ubuntu"/g' /etc/netplan/*.yaml
161160
echo "ubuntu" > /etc/hostname
162161
chmod 644 /etc/hostname
162+
# Set the hostname
163+
164+
# Prevent cloud-init from changing the hostname
165+
sed -i 's/^preserve_hostname: false/preserve_hostname: true/' /etc/cloud/cloud.cfg
163166
}
164167

165168
# Set options for the default interface

0 commit comments

Comments
 (0)