listupgrade : old-kernel-removal.sh upstream release 24.01
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2673|6|2667|7|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/447//ansiblelint">Evolix » ansible-roles » unstable #447</a>
gitea/ansible-roles/pipeline/head This commit looks good

This commit is contained in:
Jérémy Lecour 2024-01-12 11:39:01 +01:00 committed by Jérémy Lecour
parent bca5b9f28c
commit f3eb7a4981
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY
2 changed files with 4 additions and 3 deletions

View file

@ -43,6 +43,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
* evolinux-base: dump-server-state upstream release 23.11
* evolinux-base: use separate default config file for rsyslog
* kvmstats: use .capacity instead of .physical for disk size
* listupgrade : old-kernel-removal.sh upstream release 24.01
* log2mail: move custom config in separate file
* lxc: init /etc git repository in lxc container
* mysql: disable performance schema for Debian 8

View file

@ -4,7 +4,7 @@
# fork by reg from /etc/kernel/postinst.d/apt-auto-removal script
VERSION="21.10"
VERSION="24.01"
readonly VERSION
PROGNAME=$(basename "$0")
@ -13,7 +13,7 @@ show_version() {
cat <<END
${PROGNAME} version ${VERSION}
Copyright 2018-2021 Evolix <info@evolix.fr>,
Copyright 2018-2024 Evolix <info@evolix.fr>,
Gregory Colpart <reg@evolix.fr>,
Romain Dessort <rdessort@evolix.fr>,
Ludovic Poujol <lpoujol@evolix.fr>,
@ -105,7 +105,7 @@ main() {
echo "BEFORE"
dpkg -l | grep linux-image
dpkg --get-selections | tr '\t' ' ' | cut -d" " -f1 | grep '^linux-image-[234]' | grep -v -E "(${kernels})" | xargs --no-run-if-empty ${APT} -o Dir::State::Lists="${listupgrade_state_dir}" -y purge
dpkg --get-selections | tr '\t' ' ' | cut -d" " -f1 | grep '^linux-image-[0-9]' | grep -v -E "(${kernels})" | xargs --no-run-if-empty ${APT} -o Dir::State::Lists="${listupgrade_state_dir}" -y purge
echo "
AFTER"