mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-24 14:01:56 +00:00
Update Kernel Clean to work with PBS
This commit is contained in:
parent
50b12c44dd
commit
eb57929e56
@ -14,7 +14,6 @@ CM="${GN}✓${CL}"
|
|||||||
CROSS="${RD}✗${CL}"
|
CROSS="${RD}✗${CL}"
|
||||||
PARTY="🎉"
|
PARTY="🎉"
|
||||||
current_kernel=$(uname -r)
|
current_kernel=$(uname -r)
|
||||||
pve=$(pveversion)
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -p "This will Clean Unused Kernel Images, USE AT YOUR OWN RISK. Proceed(y/n)?" yn
|
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() {
|
function kernel_info() {
|
||||||
latest_kernel=$(dpkg --list| grep 'kernel-.*-pve' | awk '{print $2}' | tac | head -n 1)
|
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 [[ "$current_kernel" == *"pve"* ]]; then
|
||||||
if [[ "$latest_kernel" != *"$current_kernel"* ]]; then
|
if [[ "$latest_kernel" != *"$current_kernel"* ]]; then
|
||||||
echo -e "${GN}Latest Kernel: $latest_kernel\n${CL}"
|
echo -e "${GN}Latest Kernel: $latest_kernel\n${CL}"
|
||||||
@ -120,4 +121,12 @@ msg_ok "Kernel Search Completed\n"
|
|||||||
fi
|
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
|
check_root
|
||||||
|
Loading…
Reference in New Issue
Block a user