From c9f2293acc273f44f5ec67081be00413bbd1828a Mon Sep 17 00:00:00 2001 From: Mikhail Koliada <88318005+mikhailkoliada@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:35:21 +0200 Subject: [PATCH] [Ubuntu] do not restart provisioner on 24.04 automatically (#9979) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Ubuntu] does not restart provisioner on 24.04 automatically * Update images/ubuntu/scripts/build/configure-system.sh Co-authored-by: Kacper Michajłow --------- Co-authored-by: Kacper Michajłow --- images/ubuntu/scripts/build/configure-system.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/images/ubuntu/scripts/build/configure-system.sh b/images/ubuntu/scripts/build/configure-system.sh index 257e5ff4..4c82e353 100644 --- a/images/ubuntu/scripts/build/configure-system.sh +++ b/images/ubuntu/scripts/build/configure-system.sh @@ -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