Update Kernel Clean to work with PBS

pull/506/head
tteckster 2 years ago committed by GitHub
parent 50b12c44dd
commit eb57929e56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,7 +14,6 @@ CM="${GN}✓${CL}"
CROSS="${RD}${CL}"
PARTY="🎉"
current_kernel=$(uname -r)
pve=$(pveversion)
while true; do
read -p "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed(y/n)?" yn
@ -70,7 +69,9 @@ function edge_kernel() {
function kernel_info() {
latest_kernel=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print $2}' | tac | head -n 1)
echo -e "${YW}PVE Version: ${BL}$pve\n${CL}"
if [[ "$MODE" != "PBS" ]]; then
echo -e "${YW}PVE Version: ${BL}$(pveversion)\n${CL}"
fi
if [[ "$current_kernel" == *"pve"* ]]; then
if [[ "$latest_kernel" != *"$current_kernel"* ]]; then
echo -e "${GN}Latest Kernel: $latest_kernel\n${CL}"
@ -120,4 +121,12 @@ msg_ok "Kernel Search Completed\n"
fi
}
if ! command -v pveversion >/dev/null 2>&1; then
echo -e " Switching to PBS mode"
MODE="PBS"
sleep 2
else
MODE="PVE"
fi
check_root

Loading…
Cancel
Save

Powered by BW's shoe-string budget.