From bf30e06358c7ca5c29b099fe6316a11ec2ad5511 Mon Sep 17 00:00:00 2001 From: Igor Date: Tue, 23 May 2023 12:40:40 +0200 Subject: [PATCH] Remove motd spam after installing fake ubuntu advantage tools --- .../packages/fake_ubuntu_advantage_tools-deb.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/functions/compilation/packages/fake_ubuntu_advantage_tools-deb.sh b/lib/functions/compilation/packages/fake_ubuntu_advantage_tools-deb.sh index 78d9892835..b47321f981 100644 --- a/lib/functions/compilation/packages/fake_ubuntu_advantage_tools-deb.sh +++ b/lib/functions/compilation/packages/fake_ubuntu_advantage_tools-deb.sh @@ -36,6 +36,14 @@ function compile_fake_ubuntu_advantage_tools() { Description: Ban ubuntu-advantage-tools while satisfying ubuntu-minimal dependency END + # set up post install script + cat <<- END > DEBIAN/postinst + #!/bin/sh + rm -f /var/lib/ubuntu-advantage/messages/motd-esm-announce 2> /dev/null + exit 0 + END + + cd "${fw_temp_dir}" || exit_with_error "can't change directory" # package, directly to DEB_STORAGE; full version might be very big for tmpfs.