Update kernel-clean.sh

add warning for opt-in kernels
This commit is contained in:
tteckster 2023-05-16 03:10:49 -04:00 committed by GitHub
parent c9006a67d6
commit 51ee45e88f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -8,11 +8,11 @@
function header_info { function header_info {
cat <<"EOF" cat <<"EOF"
__ __ __ ________ __ __ __ ________
/ //_/__ _________ ___ / / / ____/ /__ ____ _____ / //_/__ _________ ___ / / / ____/ /__ ____ _____
/ ,< / _ \/ ___/ __ \/ _ \/ / / / / / _ \/ __ `/ __ \ / ,< / _ \/ ___/ __ \/ _ \/ / / / / / _ \/ __ `/ __ \
/ /| / __/ / / / / / __/ / / /___/ / __/ /_/ / / / / / /| / __/ / / / / / __/ / / /___/ / __/ /_/ / / / /
/_/ |_\___/_/ /_/ /_/\___/_/ \____/_/\___/\__,_/_/ /_/ /_/ |_\___/_/ /_/ /_/\___/_/ \____/_/\___/\__,_/_/ /_/
EOF EOF
} }
set -euo pipefail set -euo pipefail
@ -69,9 +69,9 @@ function other_kernel() {
echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n"
exit 1 exit 1
fi fi
if [[ "$current_kernel" == *"6.1"* ]]; then if [[ "$current_kernel" == *"6.1"* || "$current_kernel" == *"6.2"* ]]; then
echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active"
echo -e "\nAs 5.15 is the current default kernel in PVE 7.3 the package management directly depends on it, it's not possible to use this script while running 6.1 kernels. (the script tries to remove ALL old kernels) \n" echo -e "\nThe script cannot be used when running opt-in kernels. \nProxmox VE's package management relies directly on the current default kernel, which is 5.15. \nTherefore, it is not possible to utilize this script. In this case, you should use autoremove instead. \n`apt-get autoremove`\n"
exit 1 exit 1
fi fi
} }