Skip to content

Commit 2d7db07

Browse files
committed
chore: restore function
1 parent d54a847 commit 2d7db07

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

ebssurrogate/scripts/chroot-bootstrap-nix.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function update_install_packages {
5858
apt-get upgrade -y
5959

6060
# Install OpenSSH and other packages
61-
sudo add-apt-repository universe -y
61+
sudo add-apt-repository universe
6262
apt-get update
6363
apt-get install -y --no-install-recommends \
6464
openssh-server \
@@ -157,12 +157,10 @@ 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
160162
echo "ubuntu" > /etc/hostname
161163
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
166164
}
167165

168166
# Set options for the default interface

0 commit comments

Comments
 (0)