diff --git a/cloud-init.spec b/cloud-init.spec index def5cadaea74bf3c2f6e4a8cf62a738ff6b26bb3..25349c56c3f798deeb75dde20faf03af11fa2d04 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 %define commitid 80cf5dc %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -165,6 +165,8 @@ then /bin/systemctl enable cloud-init.service >/dev/null 2>&1 || : /bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || : fi +if [ -f /etc/image-id ]; +then grep -Eiq 'qboot|quick boot' /etc/image-id && sed -i "/Before=sshd.service/d" /usr/lib/systemd/system/cloud-init.service grep -Eiq 'qboot|quick boot' /etc/image-id && sed -i "/Before=sshd-keygen.service/d" /usr/lib/systemd/system/cloud-init.service grep -Eiq 'qboot|quick boot' /etc/image-id && sed -i "s/Before=network-online.target/After=network-online.target/g" /usr/lib/systemd/system/cloud-init.service @@ -172,6 +174,7 @@ grep -Eiq 'qboot|quick boot' /etc/image-id && sed -i "/Wants=network-pre.target/ grep -Eiq 'qboot|quick boot' /etc/image-id && sed -i "/Before=NetworkManager.service/d" /usr/lib/systemd/system/cloud-init-local.service grep -Eiq 'qboot|quick boot' /etc/image-id && sed -i "s/Before=network-pre.target/Requires=network-online.target/g" /usr/lib/systemd/system/cloud-init-local.service grep -Eiq 'qboot|quick boot' /etc/image-id && sed -i "s/After=systemd-remount-fs.service/After=systemd-remount-fs.service network-online.target/g" /usr/lib/systemd/system/cloud-init-local.service +fi %else /sbin/chkconfig --add %{_initrddir}/cloud-init-local /sbin/chkconfig --add %{_initrddir}/cloud-init @@ -252,6 +255,9 @@ fi %{python_sitelib}/* %changelog +* Wed Jul 03 2024 Chaochao Bai - 23.2.2-1.0.2 +- Add Qboot condition check + * Tue Jan 23 2024 Xiaoping Liu - 23.2.2-1.0.1 - update to 23.2.2