We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea645c0 commit 73bff06Copy full SHA for 73bff06
ebssurrogate/scripts/chroot-bootstrap-nix.sh
@@ -157,10 +157,19 @@ function disable_fsck {
157
158
# Don't request hostname during boot but set hostname
159
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
+ # Set the static hostname
162
echo "ubuntu" > /etc/hostname
163
chmod 644 /etc/hostname
+ # Update netplan configuration to not send hostname
164
+ cat << EOF > /etc/netplan/01-hostname.yaml
165
+network:
166
+ version: 2
167
+ ethernets:
168
+ eth0:
169
+ dhcp4: true
170
+ dhcp4-overrides:
171
+ send-hostname: false
172
+EOF
173
}
174
175
# Set options for the default interface
0 commit comments