File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ function update_install_packages {
58
58
apt-get upgrade -y
59
59
60
60
# Install OpenSSH and other packages
61
- sudo add-apt-repository universe -y
61
+ sudo add-apt-repository universe
62
62
apt-get update
63
63
apt-get install -y --no-install-recommends \
64
64
openssh-server \
@@ -157,12 +157,10 @@ function disable_fsck {
157
157
158
158
# Don't request hostname during boot but set hostname
159
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
160
162
echo " ubuntu" > /etc/hostname
161
163
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
166
164
}
167
165
168
166
# Set options for the default interface
You can’t perform that action at this time.
0 commit comments