aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Jackson <barjac@mageia.org>2023-01-28 14:21:41 +0000
committerBarry Jackson <barjac@mageia.org>2023-01-28 14:21:41 +0000
commit8c58311365ccff6600c9dfc16803f5db97c979f3 (patch)
tree9e025c4ed27e269109715f3a79efa1f963a4b629
parent35bfff34ead3f27bab23fe2f9b1abc7dcf953c96 (diff)
downloadremove-old-kernels-8c58311365ccff6600c9dfc16803f5db97c979f3.tar
remove-old-kernels-8c58311365ccff6600c9dfc16803f5db97c979f3.tar.gz
remove-old-kernels-8c58311365ccff6600c9dfc16803f5db97c979f3.tar.bz2
remove-old-kernels-8c58311365ccff6600c9dfc16803f5db97c979f3.tar.xz
remove-old-kernels-8c58311365ccff6600c9dfc16803f5db97c979f3.zip
fix missing --auto
-rwxr-xr-xremove-old-kernels5
1 files changed, 2 insertions, 3 deletions
diff --git a/remove-old-kernels b/remove-old-kernels
index 0de12cd..294018a 100755
--- a/remove-old-kernels
+++ b/remove-old-kernels
@@ -451,10 +451,8 @@ if (( ${#dnfmssg} > 0 ));then echo -e "${dnfmssg}"; fi
#================================= Mode of execution ===================
nbt=$(wc -l < "${TMPKTR}")
-##nbt=$(cat "${TMPKTR}" | wc -l)
-if [[ ${nbt} -ne 0 ]] ; then
+if (( nbt != 0 )) ; then
(( UID > 0 )) && echo -e "${RemvCol}$(i18n "Must be root to allow removal")\n${Normal}"
-# chk_num $VISU
if (( VISU == 1 )); then
plural="s"; (( nbt == 1 )) && plural=""
if [[ "$plural" == "s" ]]; then
@@ -532,6 +530,7 @@ if [[ ${nbt} -ne 0 ]] ; then
;;
esac
else # --- automatic mode ---
+ AUTO="--auto"
if (( DEBUG == 1 )) ; then
echo -e "${InfoCol}$(i18n "DEBUG: Could execute: urpme") ${AUTO} ${installedKernelPackage}${Normal}"
((nbt--))