mirror of
https://github.com/jordanhillis/pvekclean.git
synced 2026-06-20 10:23:50 +02:00
Kernel sorting
Fixed an issue with kernels not sorting from oldest to newest correctly once the numeric value went past 9.
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@ current_kernel=$(uname -r)
|
|||||||
program_name="pvekclean"
|
program_name="pvekclean"
|
||||||
|
|
||||||
# Version
|
# Version
|
||||||
version="1.1"
|
version="1.2"
|
||||||
|
|
||||||
# Check if force removal argument is added
|
# Check if force removal argument is added
|
||||||
if [ "$1" == "-f" ] || [ "$1" == "--force" ]; then
|
if [ "$1" == "-f" ] || [ "$1" == "--force" ]; then
|
||||||
@@ -248,7 +248,7 @@ function uninstall_program(){
|
|||||||
# PVE Kernel Clean main function
|
# PVE Kernel Clean main function
|
||||||
function pve_kernel_clean {
|
function pve_kernel_clean {
|
||||||
# Find all the PVE kernels on the system
|
# Find all the PVE kernels on the system
|
||||||
kernels=$(dpkg --list| grep 'pve-kernel-.*-pve' | awk '{print $2}')
|
kernels=$(dpkg --list| grep 'pve-kernel-.*-pve' | awk '{print $2}' | sort -V)
|
||||||
# List of kernels that will be removed (adds them as the script goes on)
|
# List of kernels that will be removed (adds them as the script goes on)
|
||||||
kernels_to_remove=""
|
kernels_to_remove=""
|
||||||
# Check the /boot used
|
# Check the /boot used
|
||||||
|
|||||||
Reference in New Issue
Block a user