Skip to content

Commit a898a3f

Browse files
committed
rebase Azure image
1 parent 823ec0c commit a898a3f

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

cloudimg/CentOS-7-x86_64-Azure.ks

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ network --hostname=localhost.localdomain
2121
firewall --enabled --service=ssh
2222

2323
# Use network installation
24-
url --url="mirror.centos.org/centos/7/os/x86_64"
25-
repo --name "os" --baseurl="http://mirror.centos.org/centos/7/os/x86_64/" --cost=100
26-
repo --name "updates" --baseurl="http://mirror.centos.org/centos/7/updates/x86_64/" --cost=100
27-
repo --name "extras" --baseurl="http://mirror.centos.org/centos/7/extras/x86_64/" --cost=100
28-
24+
url --url="mirrorsnap.centos.org/DATESTAMP/centos/7/os/x86_64"
25+
repo --name "os" --baseurl="http://mirrorsnap.centos.org/DATESTAMP/centos/7/os/x86_64/" --cost=100
26+
repo --name "updates" --baseurl="http://mirrorsnap.centos.org/DATESTAMP/centos/7/updates/x86_64/" --cost=100
27+
repo --name "extras" --baseurl="http://mirrorsnap.centos.org/DATESTAMP/centos/7/extras/x86_64/" --cost=100
2928
# Root password
30-
rootpw --plaintext "to_be_disabled"
29+
rootpw --iscrypted nothing
3130
selinux --enforcing
3231

3332
# System services
@@ -36,7 +35,7 @@ services --disabled="kdump,abrtd" --enabled="network,sshd,rsyslog,chronyd,waagen
3635
%end
3736

3837
# System timezone
39-
timezone Etc/UTC --isUtc
38+
timezone UTC --isUtc
4039

4140
# Disk partitioning information
4241
zerombr
@@ -68,10 +67,11 @@ hypervkvpd
6867
%end
6968

7069

71-
%post --erroronfail --log=/var/log/anaconda/post-install.log
70+
%post --erroronfail
7271
#!/bin/bash
7372
74-
usermod root -p '!!'
73+
passwd -d root
74+
passwd -l root
7575
7676
# setup systemd to boot to the right runlevel
7777
rm -f /etc/systemd/system/default.target
@@ -80,6 +80,7 @@ ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
8080
# Set the kernel cmdline
8181
sed -i 's/^\(GRUB_CMDLINE_LINUX\)=".*"$/\1="console=tty1 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 rootdelay=300 net.ifnames=0 scsi_mod.use_blk_mq=y"/g' /etc/default/grub
8282
83+
8384
# Enable grub serial console
8485
echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >> /etc/default/grub
8586
sed -i 's/^GRUB_TERMINAL_OUTPUT=".*"$/GRUB_TERMINAL="serial console"/g' /etc/default/grub
@@ -105,9 +106,6 @@ dracut -v -f "/boot/initramfs-${kversion}.img" "$kversion"
105106
# Import CentOS public key
106107
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
107108
108-
# Enable SSH keepalive
109-
sed -i 's/^#\(ClientAliveInterval\).*$/\1 180/g' /etc/ssh/sshd_config
110-
111109
# Configure network
112110
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0
113111
DEVICE=eth0
@@ -118,7 +116,7 @@ USERCTL=no
118116
PEERDNS=yes
119117
IPV6INIT=no
120118
NM_CONTROLLED=no
121-
PERSISTENT_DHCLIENT=yes
119+
PERSISTENT_DHCLIENT="1"
122120
EOF
123121
124122
cat << EOF > /etc/sysconfig/network
@@ -143,9 +141,8 @@ EOF
143141
144142
# Change dhcp client retry/timeouts to resolve #6866
145143
cat >> /etc/dhcp/dhclient.conf << EOF
146-
147-
timeout 300;
148-
retry 60;
144+
timeout 300
145+
retry 60
149146
EOF
150147
151148
# Blacklist the nouveau driver as it is incompatible

0 commit comments

Comments
 (0)