]> git.proxmox.com Git - pve-kernel-meta.git/blobdiff - efiboot/pve-auto-removal
proxmox-boot-tool: rename from pve-efiboot-tool
[pve-kernel-meta.git] / efiboot / pve-auto-removal
diff --git a/efiboot/pve-auto-removal b/efiboot/pve-auto-removal
deleted file mode 100755 (executable)
index 7b21ec4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh
-set -e
-
-. /usr/share/pve-kernel-helper/scripts/functions
-
-eval "$(apt-config shell APT_CONF_D Dir::Etc::parts/d)"
-test -n "${APT_CONF_D}" || APT_CONF_D="/etc/apt/apt.conf.d"
-
-config_file="${APT_CONF_D}/76pveconf"
-
-generate_apt_config() {
-
-       kernels="$(kernel_keep_versions "$@")"
-
-       cat <<- EOF
-       // DO NOT EDIT! File autogenerated by $0
-       APT::NeverAutoRemove
-       {
-       EOF
-       for kernel in $kernels; do
-               escaped_kver="$(echo "$kernel" |  sed -e 's#\([\.\+]\)#\\\1#g')"
-               echo "   \"^pve-kernel-${escaped_kver}$\";"
-       done
-       echo '};'
-       if [ "${APT_AUTO_REMOVAL_KERNELS_DEBUG:-false}" = 'true' ]; then
-               cat <<-EOF
-               /* Debug information:
-               # dpkg list:
-               $(dpkg -l | grep -F 'pve-kernel' || true)
-               # list of installed kernel packages:
-               $kernels
-               */
-               EOF
-       fi
-}
-
-generate_apt_config "$@" > "${config_file}.dpkg-new"
-mv -f "${config_file}.dpkg-new" "$config_file"
-chmod 444 "$config_file"