-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for FusionOS 22 and 23 (#514)
Signed-off-by: linhuali <[email protected]>
- Loading branch information
Showing
6 changed files
with
220 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#version=DEVEL | ||
# Use graphical install | ||
graphical | ||
|
||
%packages | ||
@^graphical-server-environment | ||
kexec-tools | ||
cloud-init | ||
java-1.8.0-openjdk-headless | ||
java-1.8.0-openjdk | ||
ndctl | ||
iproute | ||
rdma-core | ||
librdmacm-utils | ||
libibverbs | ||
libibverbs-utils | ||
infiniband-diags | ||
perftest | ||
%end | ||
|
||
# Keyboard layouts | ||
keyboard --xlayouts='us' | ||
# System language | ||
lang en_US.UTF-8 | ||
|
||
# Network information | ||
network --bootproto=dhcp --onboot=yes --ipv6=auto --activate | ||
network --hostname=localhost.localdomain | ||
|
||
# Use CDROM installation media | ||
cdrom | ||
# SELinux configuration | ||
selinux --disabled | ||
|
||
# X Window System configuration information | ||
xconfig --startxonboot | ||
# Do not run the Setup Agent on first boot | ||
firstboot --disable | ||
# System services | ||
services --enabled="chronyd" | ||
services --disabled="firewalld" | ||
|
||
ignoredisk --only-use={{ boot_disk_name }} | ||
autopart | ||
# Partition clearing information | ||
clearpart --none --initlabel | ||
|
||
# System timezone | ||
timezone Asia/Shanghai --utc | ||
|
||
# Shutdown when the install is finished. | ||
shutdown | ||
|
||
# Root password | ||
rootpw --iscrypted {{ vm_password_hash }} | ||
# Add SSH key | ||
sshkey --username=root "{{ ssh_public_key }}" | ||
|
||
{% if new_user is defined and new_user != 'root' %} | ||
user --name={{ new_user }} --password={{ vm_password_hash }} --groups=root,wheel --iscrypted --gecos="{{ new_user }}" | ||
sshkey --username={{ new_user }} "{{ ssh_public_key }}" | ||
{% endif %} | ||
|
||
%addon com_redhat_kdump --disable --reserve-mb='128' | ||
|
||
%end | ||
|
||
%anaconda | ||
pwpolicy root --minlen=8 --minquality=1 --strict --nochanges --notempty | ||
pwpolicy user --minlen=8 --minquality=1 --strict --nochanges --emptyok | ||
pwpolicy luks --minlen=8 --minquality=1 --strict --nochanges --notempty | ||
%end | ||
|
||
%post --interpreter=/usr/bin/bash --log=/root/ks-post.log | ||
if [ -f /etc/cloud/cloud.cfg ]; then | ||
sed -i 's/^disable_root:.*/disable_root: false/' /etc/cloud/cloud.cfg | ||
sed -i 's/^ssh_pwauth:.*/ssh_pwauth: yes/' /etc/cloud/cloud.cfg | ||
fi | ||
|
||
# Permit root login via SSH | ||
sed -i 's/^PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config | ||
|
||
# Workaround for setting guest_os_family as RHEL | ||
if [ -f /etc/FusionOS-release ] && [ ! -f /etc/redhat-release ]; then | ||
ln -s /etc/FusionOS-release /etc/redhat-release | ||
fi | ||
|
||
{% if new_user is defined and new_user != 'root' %} | ||
# Add new user to sudoer | ||
echo '{{ new_user }} ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/{{ new_user }} | ||
# Enable autologin | ||
sed -i '/\[daemon\]/a AutomaticLogin={{ new_user }}' /etc/gdm/custom.conf | ||
sed -i '/\[daemon\]/a AutomaticLoginEnable=True' /etc/gdm/custom.conf | ||
{% endif %} | ||
echo '{{ autoinstall_complete_msg }}' >/dev/ttyS0 | ||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#version=DEVEL | ||
# Use graphical install | ||
graphical | ||
|
||
%packages | ||
@^server-product-environment | ||
kexec-tools | ||
#open-vm-tools-desktop | ||
cloud-init | ||
java-1.8.0-openjdk-headless | ||
java-1.8.0-openjdk | ||
ndctl | ||
iproute | ||
rdma-core | ||
librdmacm-utils | ||
libibverbs | ||
libibverbs-utils | ||
infiniband-diags | ||
perftest | ||
%end | ||
|
||
# Keyboard layouts | ||
keyboard --xlayouts='us' | ||
# System language | ||
lang en_US.UTF-8 | ||
|
||
# Network information | ||
network --bootproto=dhcp --ipv6=auto --activate | ||
network --hostname=localhost.localdomain | ||
|
||
# Use CDROM installation media | ||
cdrom | ||
# SELinux configuration | ||
selinux --disabled | ||
|
||
# X Window System configuration information | ||
xconfig --startxonboot | ||
# Do not run the Setup Agent on first boot | ||
firstboot --disable | ||
# System services | ||
services --enabled="chronyd" | ||
services --disabled="firewalld" | ||
|
||
ignoredisk --only-use={{ boot_disk_name }} | ||
autopart | ||
# Partition clearing information | ||
clearpart --none --initlabel | ||
|
||
# System timezone | ||
timezone Asia/Shanghai --utc | ||
|
||
# Shutdown when the install is finished. | ||
shutdown | ||
|
||
# Root password | ||
rootpw --iscrypted {{ vm_password_hash }} | ||
# Add SSH key | ||
sshkey --username=root "{{ ssh_public_key }}" | ||
|
||
{% if new_user is defined and new_user != 'root' %} | ||
user --name={{ new_user }} --password={{ vm_password_hash }} --groups=root,wheel --iscrypted --gecos="{{ new_user }}" | ||
sshkey --username={{ new_user }} "{{ ssh_public_key }}" | ||
{% endif %} | ||
|
||
%addon com_redhat_kdump --disable --reserve-mb='128' | ||
|
||
%end | ||
|
||
%post --interpreter=/usr/bin/bash --log=/root/ks-post.log | ||
if [ -f /etc/cloud/cloud.cfg ]; then | ||
sed -i 's/^disable_root:.*/disable_root: false/' /etc/cloud/cloud.cfg | ||
sed -i 's/^ssh_pwauth:.*/ssh_pwauth: yes/' /etc/cloud/cloud.cfg | ||
fi | ||
|
||
# Permit root login via SSH | ||
sed -i 's/^PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config | ||
|
||
# Workaround for setting guest_os_family as RHEL | ||
if [ -f /etc/FusionOS-release ] && [ ! -f /etc/redhat-release ]; then | ||
ln -s /etc/FusionOS-release /etc/redhat-release | ||
fi | ||
|
||
{% if new_user is defined and new_user != 'root' %} | ||
# Add new user to sudoer | ||
echo '{{ new_user }} ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/{{ new_user }} | ||
# Enable autologin | ||
sed -i '/\[daemon\]/a AutomaticLogin={{ new_user }}' /etc/gdm/custom.conf | ||
sed -i '/\[daemon\]/a AutomaticLoginEnable=True' /etc/gdm/custom.conf | ||
{% endif %} | ||
echo '{{ autoinstall_complete_msg }}' >/dev/ttyS0 | ||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters