diff --git a/UTM.ign b/UTM.ign index 8c90312..32d015c 100644 --- a/UTM.ign +++ b/UTM.ign @@ -162,7 +162,7 @@ "name": "postinst.service" }, { - "contents": "[Unit]\nDescription=Initial System Setup Part 2\n# We run this after files have been downloaded\nAfter=postinst.service\nBefore=zincati.service\nConditionPathExists=!/var/lib/%N.stamp\nConditionPathExists=/var/home/unpriv/postinst.stamp\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/cp /var/home/unpriv/chrony.conf /etc/chrony.conf\nExecStart=/usr/bin/cp /var/home/unpriv/30_security-misc.conf /etc/modprobe.d/30_security-misc.conf\nExecStart=/usr/bin/cp /var/home/unpriv/990-security-misc.conf /etc/sysctl.d/990-security-misc.conf\nExecStart=/usr/bin/cp /var/home/unpriv/30_silent-kernel-printk.conf /etc/sysctl.d/30_silent-kernel-printk.conf\nExecStart=/usr/bin/cp /var/home/unpriv/30_security-misc_kexec-disable.conf /etc/sysctl.d/30_security-misc_kexec-disable.conf\nExecStart=/usr/bin/mkdir -p /etc/systemd/system/sshd.service.d\nExecStart=/usr/bin/cp /var/home/unpriv/local.conf /etc/systemd/system/sshd.service.d/override.conf\nExecStart=/usr/bin/cp /var/home/unpriv/10-custom.conf /etc/ssh/sshd_config.d/10-custom.conf\nExecStart=/usr/bin/mkdir -p /etc/systemd/system/NetworkManager.service.d\nExecStart=/usr/bin/cp /var/home/unpriv/NetworkManager-brace.conf /etc/systemd/system/NetworkManager.service.d/99-brace.conf\nExecStart=/usr/bin/mkdir -p /etc/systemd/system/irqbalance.service.d\nExecStart=/usr/bin/cp /var/home/unpriv/irqbalance-brace.conf /etc/systemd/system/irqbalance.service.d/99-brace.conf\nExecStart=/usr/bin/systemctl restart chronyd\nExecStart=/usr/bin/rpm-ostree install firewalld qemu-guest-agent tuned unbound\nExecStart=/usr/bin/rpm-ostree override remove cifs-utils containerd moby-engine runc samba-common-libs samba-client-libs libsmbclient libwbclient samba-common sssd-krb5-common sssd-ipa sssd-nfs-idmap sssd-ldap sssd-client sssd-ad sssd-common sssd-krb5 sssd-common-pac\nExecStart=/usr/bin/sed -i 's/nullok//g' /etc/pam.d/system-auth\nExecStart=/usr/bin/echo 'allow 10.0.2.2/32' \u003e\u003e /etc/chrony.conf\nExecStart=/usr/bin/sed -i 's/# install bluetooth/install bluetooth/g' /etc/modprobe.d/30_security-misc.conf\nExecStart=/usr/bin/sed -i 's/# install btusb/install btusb/g' /etc/modprobe.d/30_security-misc.conf\nExecStart=/usr/bin/sed -i 's/kernel.yama.ptrace_scope=2/kernel.yama.ptrace_scope=1/g' /etc/sysctl.d/990-security-misc.conf\nExecStart=/usr/bin/sed -i 's/net.ipv4.icmp_echo_ignore_all=1/net.ipv4.icmp_echo_ignore_all=0/g' /etc/sysctl.d/990-security-misc.conf\nExecStart=/usr/bin/sed -i 's/net.ipv6.icmp.echo_ignore_all=1/net.ipv6.icmp.echo_ignore_all=0/g' /etc/sysctl.d/990-security-misc.conf\nExecStart=/usr/bin/systemctl disable systemd-resolved\nExecStart=/usr/bin/touch /var/lib/%N.stamp\nExecStart=/usr/bin/systemctl --no-block reboot\n\n[Install]\nWantedBy=multi-user.target\n", + "contents": "[Unit]\nDescription=Initial System Setup Part 2\n# We run this after files have been downloaded\nAfter=postinst.service\nBefore=zincati.service\nConditionPathExists=!/var/lib/%N.stamp\nConditionPathExists=/var/home/unpriv/postinst.stamp\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/cp /var/home/unpriv/chrony.conf /etc/chrony.conf\nExecStart=/usr/bin/cp /var/home/unpriv/30_security-misc.conf /etc/modprobe.d/30_security-misc.conf\nExecStart=/usr/bin/cp /var/home/unpriv/990-security-misc.conf /etc/sysctl.d/990-security-misc.conf\nExecStart=/usr/bin/cp /var/home/unpriv/30_silent-kernel-printk.conf /etc/sysctl.d/30_silent-kernel-printk.conf\nExecStart=/usr/bin/cp /var/home/unpriv/30_security-misc_kexec-disable.conf /etc/sysctl.d/30_security-misc_kexec-disable.conf\nExecStart=/usr/bin/mkdir -p /etc/systemd/system/sshd.service.d\nExecStart=/usr/bin/cp /var/home/unpriv/local.conf /etc/systemd/system/sshd.service.d/override.conf\nExecStart=/usr/bin/cp /var/home/unpriv/10-custom.conf /etc/ssh/sshd_config.d/10-custom.conf\nExecStart=/usr/bin/mkdir -p /etc/systemd/system/NetworkManager.service.d\nExecStart=/usr/bin/cp /var/home/unpriv/NetworkManager-brace.conf /etc/systemd/system/NetworkManager.service.d/99-brace.conf\nExecStart=/usr/bin/mkdir -p /etc/systemd/system/irqbalance.service.d\nExecStart=/usr/bin/cp /var/home/unpriv/irqbalance-brace.conf /etc/systemd/system/irqbalance.service.d/99-brace.conf\nExecStart=/usr/bin/systemctl restart chronyd\nExecStart=/usr/bin/rpm-ostree install firewalld qemu-guest-agent tuned unbound\nExecStart=/usr/bin/rpm-ostree override remove cifs-utils containerd moby-engine runc samba-common-libs samba-client-libs libsmbclient libwbclient samba-common sssd-krb5-common sssd-ipa sssd-nfs-idmap sssd-ldap sssd-client sssd-ad sssd-common sssd-krb5 sssd-common-pac\nExecStart=/usr/bin/sed -i 's/nullok//g' /etc/pam.d/system-auth\nExecStart=/usr/bin/sed -i '$ a\\allow 10.0.2.2/32' /etc/chrony.conf\nExecStart=/usr/bin/sed -i 's/# install bluetooth/install bluetooth/g' /etc/modprobe.d/30_security-misc.conf\nExecStart=/usr/bin/sed -i 's/# install btusb/install btusb/g' /etc/modprobe.d/30_security-misc.conf\nExecStart=/usr/bin/sed -i 's/kernel.yama.ptrace_scope=2/kernel.yama.ptrace_scope=1/g' /etc/sysctl.d/990-security-misc.conf\nExecStart=/usr/bin/sed -i 's/net.ipv4.icmp_echo_ignore_all=1/net.ipv4.icmp_echo_ignore_all=0/g' /etc/sysctl.d/990-security-misc.conf\nExecStart=/usr/bin/sed -i 's/net.ipv6.icmp.echo_ignore_all=1/net.ipv6.icmp.echo_ignore_all=0/g' /etc/sysctl.d/990-security-misc.conf\nExecStart=/usr/bin/systemctl disable systemd-resolved\nExecStart=/usr/bin/touch /var/lib/%N.stamp\nExecStart=/usr/bin/systemctl --no-block reboot\n\n[Install]\nWantedBy=multi-user.target\n", "enabled": true, "name": "postinst2.service" }, diff --git a/UTM.yml b/UTM.yml index 8160948..f5abed6 100644 --- a/UTM.yml +++ b/UTM.yml @@ -87,7 +87,7 @@ systemd: ExecStart=/usr/bin/rpm-ostree install firewalld qemu-guest-agent tuned unbound ExecStart=/usr/bin/rpm-ostree override remove cifs-utils containerd moby-engine runc samba-common-libs samba-client-libs libsmbclient libwbclient samba-common sssd-krb5-common sssd-ipa sssd-nfs-idmap sssd-ldap sssd-client sssd-ad sssd-common sssd-krb5 sssd-common-pac ExecStart=/usr/bin/sed -i 's/nullok//g' /etc/pam.d/system-auth - ExecStart=/usr/bin/echo 'allow 10.0.2.2/32' >> /etc/chrony.conf + ExecStart=/usr/bin/sed -i '$ a\allow 10.0.2.2/32' /etc/chrony.conf ExecStart=/usr/bin/sed -i 's/# install bluetooth/install bluetooth/g' /etc/modprobe.d/30_security-misc.conf ExecStart=/usr/bin/sed -i 's/# install btusb/install btusb/g' /etc/modprobe.d/30_security-misc.conf ExecStart=/usr/bin/sed -i 's/kernel.yama.ptrace_scope=2/kernel.yama.ptrace_scope=1/g' /etc/sysctl.d/990-security-misc.conf