From 67df97f09943fd561815a56ace3086693b8d466c Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Wed, 11 Sep 2024 11:21:27 -0700 Subject: [PATCH] ubuntu-server: disable kdump-tools by default We install the kdump-tools package to minimal layer via inclusion in the server-minimal seed, but it is enabled by default. Include a new chroot hook to set USE_KDUMP=0 to make sure it's disabled by default and let the installer decide to enable it or not. --- .../hooks/06-kdump-tools-disable.chroot | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 live-build/ubuntu-server/hooks/06-kdump-tools-disable.chroot diff --git a/live-build/ubuntu-server/hooks/06-kdump-tools-disable.chroot b/live-build/ubuntu-server/hooks/06-kdump-tools-disable.chroot new file mode 100644 index 00000000..aab32cbd --- /dev/null +++ b/live-build/ubuntu-server/hooks/06-kdump-tools-disable.chroot @@ -0,0 +1,19 @@ +#!/bin/bash -ex + +# We install kdump-tools in the minimal layer but it's enabled by default. +# We disable it here and let subiquity/curtin decide when to enable it later. +# This is also important so that it's not in some semi-enabled state in the +# live system where USE_KDUMP=1 but it's missing the crashkernel parameter on +# the kernel command line. Let's be doubly sure and set USE_KDUMP=0. + +case ${PASS} in + ubuntu-server-minimal) + ;; + *) + exit 0 + ;; +esac + +# kdump-tools relies on USE_KDUMP=1 to be enabled, set to USE_KDUMP=0 for off. +sed -i 's/USE_KDUMP=1/USE_KDUMP=0/' /etc/default/kdump-tools +