[Ubuntu] do not restart provisioner on 24.04 automatically (#9979)

* [Ubuntu] does not restart provisioner on 24.04 automatically

* Update images/ubuntu/scripts/build/configure-system.sh

Co-authored-by: Kacper Michajłow <kasper93@gmail.com>

---------

Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Mikhail Koliada
2024-06-04 11:35:21 +02:00
committed by GitHub
parent a9f4b4f480
commit c9f2293acc

View File

@@ -4,8 +4,8 @@
## Desc: Post deployment system configuration actions
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPT_FOLDER/etc-environment.sh
source $HELPER_SCRIPT_FOLDER/os.sh
mv -f /imagegeneration/post-generation /opt
@@ -31,3 +31,10 @@ fi
if npm --version; then
npm cache clean --force
fi
if is_ubuntu24; then
# Prevent needrestart from restarting the provisioner service.
# Currently only happens on Ubuntu 24.04, so make it conditional for the time being
# as configuration is too different between Ubuntu versions.
sed -i '/^\s*};/i \ qr(^runner-provisioner) => 0,' /etc/needrestart/needrestart.conf
fi