From b27b040dab84568cd226c9179fb18df6307b4de6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 4 Mar 2022 12:36:54 -0500 Subject: [PATCH] Update and rename kernelclean.sh to kernel-clean.sh --- misc/{kernelclean.sh => kernel-clean.sh} | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) rename misc/{kernelclean.sh => kernel-clean.sh} (93%) diff --git a/misc/kernelclean.sh b/misc/kernel-clean.sh similarity index 93% rename from misc/kernelclean.sh rename to misc/kernel-clean.sh index f544a61e..77fb4dec 100644 --- a/misc/kernelclean.sh +++ b/misc/kernel-clean.sh @@ -5,7 +5,15 @@ RD=`echo "\033[01;31m"` CM='\xE2\x9C\x94\033' GN=`echo "\033[1;92m"` CL=`echo "\033[m"` -# Current kernel +while true; do + read -p "This will Clean unused Kernel images. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +clear current_kernel=$(uname -r) function check_root { if [[ $EUID -ne 0 ]]; then @@ -13,7 +21,6 @@ function check_root { exit 1 fi } -clear function header_info { echo -e "${RD} _ __ _ _____ _