diff options
author | Barry Jackson <barjac@mageia.org> | 2023-01-06 13:09:25 +0000 |
---|---|---|
committer | Barry Jackson <barjac@mageia.org> | 2023-01-06 13:09:25 +0000 |
commit | 493b6767202881487196455be5068f5115a23882 (patch) | |
tree | 0ac3097634d4f0ae0d7a493bd0056be0f7234b00 | |
parent | 329701021825904b92d63f781cab7d3f9b0b730b (diff) | |
download | remove-old-kernels-493b6767202881487196455be5068f5115a23882.tar remove-old-kernels-493b6767202881487196455be5068f5115a23882.tar.gz remove-old-kernels-493b6767202881487196455be5068f5115a23882.tar.bz2 remove-old-kernels-493b6767202881487196455be5068f5115a23882.tar.xz remove-old-kernels-493b6767202881487196455be5068f5115a23882.zip |
change -A arguments to 0|1
-rw-r--r-- | locale/de_DE.UTF-8/LC_MESSAGES/remove-old-kernels.mo | bin | 5837 -> 6001 bytes | |||
-rw-r--r-- | locale/en_GB.UTF-8/LC_MESSAGES/remove-old-kernels.mo | bin | 5380 -> 5552 bytes | |||
-rw-r--r-- | locale/en_US.UTF-8/LC_MESSAGES/remove-old-kernels.mo | bin | 5380 -> 5551 bytes | |||
-rw-r--r-- | locale/fr_FR.UTF-8/LC_MESSAGES/remove-old-kernels.mo | bin | 5806 -> 5967 bytes | |||
-rw-r--r-- | locale/nl_NL.UTF-8/LC_MESSAGES/remove-old-kernels.mo | bin | 5783 -> 5926 bytes | |||
-rwxr-xr-x[-rw-r--r--] | mk-mo | 0 | ||||
-rw-r--r-- | po/de_DE.UTF-8.po | 24 | ||||
-rw-r--r-- | po/en_GB.UTF-8.po | 24 | ||||
-rw-r--r-- | po/en_US.UTF-8.po | 34 | ||||
-rw-r--r-- | po/fr_FR.UTF-8.po | 28 | ||||
-rw-r--r-- | po/nl_NL.UTF-8.po | 24 | ||||
-rw-r--r-- | remove-old-kernels | 31 | ||||
-rw-r--r-- | remove-old-kernels.cron | 2 |
13 files changed, 119 insertions, 48 deletions
diff --git a/locale/de_DE.UTF-8/LC_MESSAGES/remove-old-kernels.mo b/locale/de_DE.UTF-8/LC_MESSAGES/remove-old-kernels.mo Binary files differindex 7d7043b..ae44515 100644 --- a/locale/de_DE.UTF-8/LC_MESSAGES/remove-old-kernels.mo +++ b/locale/de_DE.UTF-8/LC_MESSAGES/remove-old-kernels.mo diff --git a/locale/en_GB.UTF-8/LC_MESSAGES/remove-old-kernels.mo b/locale/en_GB.UTF-8/LC_MESSAGES/remove-old-kernels.mo Binary files differindex fdf738d..6121dc3 100644 --- a/locale/en_GB.UTF-8/LC_MESSAGES/remove-old-kernels.mo +++ b/locale/en_GB.UTF-8/LC_MESSAGES/remove-old-kernels.mo diff --git a/locale/en_US.UTF-8/LC_MESSAGES/remove-old-kernels.mo b/locale/en_US.UTF-8/LC_MESSAGES/remove-old-kernels.mo Binary files differindex 9f8b154..9860c4d 100644 --- a/locale/en_US.UTF-8/LC_MESSAGES/remove-old-kernels.mo +++ b/locale/en_US.UTF-8/LC_MESSAGES/remove-old-kernels.mo diff --git a/locale/fr_FR.UTF-8/LC_MESSAGES/remove-old-kernels.mo b/locale/fr_FR.UTF-8/LC_MESSAGES/remove-old-kernels.mo Binary files differindex 71748d8..59b875d 100644 --- a/locale/fr_FR.UTF-8/LC_MESSAGES/remove-old-kernels.mo +++ b/locale/fr_FR.UTF-8/LC_MESSAGES/remove-old-kernels.mo diff --git a/locale/nl_NL.UTF-8/LC_MESSAGES/remove-old-kernels.mo b/locale/nl_NL.UTF-8/LC_MESSAGES/remove-old-kernels.mo Binary files differindex 317cc86..b0f2687 100644 --- a/locale/nl_NL.UTF-8/LC_MESSAGES/remove-old-kernels.mo +++ b/locale/nl_NL.UTF-8/LC_MESSAGES/remove-old-kernels.mo diff --git a/po/de_DE.UTF-8.po b/po/de_DE.UTF-8.po index a074a4f..2ded650 100644 --- a/po/de_DE.UTF-8.po +++ b/po/de_DE.UTF-8.po @@ -95,17 +95,29 @@ msgstr "FATAL: Lesen fehlgeschlagen:" msgid "No such alternative configuration file:" msgstr "Keine solche alternative Konfigurationsdatei:" -msgid "Usage: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" -msgstr "Verwendung: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n Anzahl] [-N Anzahl] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgid "Please use 0 or 1 for OFF and ON" +msgstr "Bitte verwenden Sie 0 oder 1 für AUS und EIN" + +msgid "Bad input value" +msgstr "Falscher Eingabewert" + +msgid "INFO: Number to keep is restricted to " +msgstr "INFO: Number to keep is restricted to " + +msgid ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" +msgstr ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" + +msgid "Usage: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgstr "Verwendung: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n Anzahl] [-N Anzahl] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" msgid " -a = automatic, no questions. Interactive if not specified. (must be root)" msgstr " -a = Automatisch, keine Frage. Interaktiv, falls nicht angegeben. (muss root sein)" -msgid " -A value = y or n to turn ON or OFF automatic weekly removal of kernels. (e.g. -Ay)" -msgstr " -A Wert = y oder n, um die automatische wöchentliche Entfernung von Kerneln ein- oder auszuschalten. (zB -Ay)" +msgid " -A value = y or n to turn ON or OFF automatic weekly removal of kernels. (e.g. -A1)" +msgstr " -A Wert = y oder n, um die automatische wöchentliche Entfernung von Kerneln ein- oder auszuschalten. (zB -A1)" -msgid " -c = as automatic but also checks for CRON=y in the cfg file or exits. (must be root)" -msgstr " -c = wie automatisch, prüft aber auch auf CRON=y in der cfg-Datei oder beendet sich. (muss root sein)" +msgid " -c = as automatic but also checks for CRON=1 in the cfg file or exits. (must be root)" +msgstr " -c = wie automatisch, prüft aber auch auf CRON=1 in der cfg-Datei oder beendet sich. (muss root sein)" msgid " -t = Test mode, nothing is removed, urpme is simulated." msgstr " -t = Testmodus, es wird nichts entfernt, urpme wird simuliert." diff --git a/po/en_GB.UTF-8.po b/po/en_GB.UTF-8.po index 38db354..7b25a7a 100644 --- a/po/en_GB.UTF-8.po +++ b/po/en_GB.UTF-8.po @@ -97,17 +97,29 @@ msgstr "FATAL: Failed to read:" msgid "No such alternative configuration file:" msgstr "No such alternative configuration file:" -msgid "Usage: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" -msgstr "Usage: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgid "Please use 0 or 1 for OFF and ON" +msgstr "Please use 0 or 1 for OFF and ON" + +msgid "Bad input value" +msgstr "Bad input value" + +msgid "INFO: Number to keep is restricted to " +msgstr "INFO: Number to keep is restricted to " + +msgid ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" +msgstr ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" + +msgid "Usage: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgstr "Usage: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" msgid " -a = automatic, no questions. Interactive if not specified. (must be root)" msgstr " -a = automatic, no questions. Interactive if not specified. (must be root)" -msgid " -A value = y or n to turn ON or OFF automatic weekly removal of kernels. (e.g. -Ay)" -msgstr " -A value = y or n to turn ON or OFF automatic weekly removal of kernels. (e.g. -Ay)" +msgid " -A value = 1 or 0 to turn ON or OFF automatic weekly removal of kernels. (e.g. -A1)" +msgstr " -A value = 1 or 0 to turn ON or OFF automatic weekly removal of kernels. (e.g. -A1)" -msgid " -c = as automatic but also checks for CRON=y in the cfg file or exits. (must be root)" -msgstr " -c = as automatic but also checks for CRON=y in the cfg file or exits. (must be root)" +msgid " -c = as automatic but also checks for CRON=1 in the cfg file or exits. (must be root)" +msgstr " -c = as automatic but also checks for CRON=1 in the cfg file or exits. (must be root)" msgid " -t = Test mode, nothing is removed, urpme is simulated." msgstr " -t = Test mode, nothing is removed, urpme is simulated." diff --git a/po/en_US.UTF-8.po b/po/en_US.UTF-8.po index ec22512..af252d1 100644 --- a/po/en_US.UTF-8.po +++ b/po/en_US.UTF-8.po @@ -1,4 +1,4 @@ -msgid "" +msgid "" msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "Project-Id-Version: remove-old-kernels\n" @@ -15,7 +15,7 @@ msgstr "" "X-Poedit-KeywordsList: \n" msgid "Welcome to 'remove-old-kernels' Interactive" -msgstr "Welcome to 'rok' Interactive" +msgstr "Welcome to 'remove-old-kernels' Interactive" msgid "Keep" msgstr "Keep" @@ -41,8 +41,10 @@ msgstr "kernel" msgid "kernels" msgstr "kernels" +# For languages where y/N/i is not appropriate DO NOT change "y/N/i" +# but edit (y=yes N=no i=confirm) with only 'yes' and 'no' translated. msgid "y/N/i (i=confirm for each)" -msgstr "y/N/i (i=confirm for each)" +msgstr "y/N/i (y=yes N=no i=confirm for each)" msgid "y/N/q (q=quit)" msgstr "y/N/q (q=quit)" @@ -95,17 +97,29 @@ msgstr "FATAL: Failed to read:" msgid "No such alternative configuration file:" msgstr "No such alternative configuration file:" -msgid "Usage: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" -msgstr "Usage: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgid "Please use 0 or 1 for OFF and ON" +msgstr "Please use 0 or 1 for OFF and ON" + +msgid "Bad input value" +msgstr "Bad input value" + +msgid "INFO: Number to keep is restricted to " +msgstr "INFO: Number to keep is restricted to " + +msgid ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" +msgstr ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" + +msgid "Usage: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgstr "Usage: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" msgid " -a = automatic, no questions. Interactive if not specified. (must be root)" msgstr " -a = automatic, no questions. Interactive if not specified. (must be root)" -msgid " -A value = y or n to turn ON or OFF automatic weekly removal of kernels. (e.g. -Ay)" -msgstr " -A value = y or n to turn ON or OFF automatic weekly removal of kernels. (e.g. -Ay)" +msgid " -A value = 1 or 0 to turn ON or OFF automatic weekly removal of kernels. (e.g. -A1)" +msgstr " -A value = 1 or 0 to turn ON or OFF automatic weekly removal of kernels. (e.g. -A1)" -msgid " -c = as automatic but also checks for CRON=y in the cfg file or exits. (must be root)" -msgstr " -c = as automatic but also checks for CRON=y in the cfg file or exits. (must be root)" +msgid " -c = as automatic but also checks for CRON=1 in the cfg file or exits. (must be root)" +msgstr " -c = as automatic but also checks for CRON=1 in the cfg file or exits. (must be root)" msgid " -t = Test mode, nothing is removed, urpme is simulated." msgstr " -t = Test mode, nothing is removed, urpme is simulated." @@ -135,7 +149,7 @@ msgid " -l = list the last 1000 lines of the log." msgstr " -l = list the last 1000 lines of the log." msgid " -m = mono. No colours in screen output." -msgstr " -m = mono. No colours in screen output." +msgstr " -m = mono. No colors in screen output." msgid " -v = version." msgstr " -v = version." diff --git a/po/fr_FR.UTF-8.po b/po/fr_FR.UTF-8.po index 4b71d28..cb37c53 100644 --- a/po/fr_FR.UTF-8.po +++ b/po/fr_FR.UTF-8.po @@ -95,17 +95,29 @@ msgstr "FATAL : Échec de la lecture :" msgid "No such alternative configuration file:" msgstr "Aucun fichier de configuration alternatif de ce type :" -msgid "Usage: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" -msgstr "Usage: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n numéro] [-N numéro] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgid "Please use 0 or 1 for OFF and ON" +msgstr "Veuillez utiliser 0 ou 1 pour OFF et ON" + +msgid "Bad input value" +msgstr "Mauvaise valeur d'entrée" + +msgid "INFO: Number to keep is restricted to " +msgstr "INFO: Number to keep is restricted to " + +msgid ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" +msgstr ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" + +msgid "Usage: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgstr "Usage: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n numéro] [-N numéro] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" msgid " -a = automatic, no questions. Interactive if not specified. (must be root)" msgstr " -a = automatique, pas de questions. Interactif si non spécifié. (doit être root)" -msgid " -A value = y or n to turn ON or OFF automatic weekly removal of kernels. (e.g. -Ay)" -msgstr " -A valeur = y ou n pour activer ou désactiver la suppression automatique des noyaux. (e.g. -Ay)" +msgid " -A value = 1 or 0 to turn ON or OFF automatic weekly removal of kernels. (e.g. -A1)" +msgstr " -A valeur = 1 ou 0 pour activer ou désactiver la suppression automatique des noyaux. (e.g. -A1)" -msgid " -c = as automatic but also checks for CRON=y in the cfg file or exits. (must be root)" -msgstr " -c = comme automatique mais vérifie également CRON=y dans le fichier cfg ou quitte. (doit être root)" +msgid " -c = as automatic but also checks for CRON=1 in the cfg file or exits. (must be root)" +msgstr " -c = comme automatique mais vérifie également CRON=1 dans le fichier cfg ou quitte. (doit être root)" msgid " -t = Test mode, nothing is removed, urpme is simulated." msgstr " -t = Mode test, rien n'est supprimé, urpme est simulé." @@ -128,8 +140,8 @@ msgstr " -p = prévisualisez les commandes urpme qui seraient utilisées." msgid " -q = advanced mode, this time only - see man page." msgstr " -q = mode avancé, cette fois uniquement - voir la page de manuel." -msgid " -Q value = 1 or 0 (1 = ON) advanced mode, persistent. (e.g. -Q 1)" -msgstr " -Q valeur = 1 ou 0 (1 = ON) mode avancé, persistant. (e.g. -Q 1)" +msgid " -Q value = 1 or 0 (1 = ON) advanced mode, persistent. (e.g. -Q1)" +msgstr " -Q valeur = 1 ou 0 (1 = ON) mode avancé, persistant. (e.g. -Q1)" msgid " -l = list the last 1000 lines of the log." msgstr " -l = liste les 1000 dernières lignes du journal." diff --git a/po/nl_NL.UTF-8.po b/po/nl_NL.UTF-8.po index 3b7c297..5ff3ed4 100644 --- a/po/nl_NL.UTF-8.po +++ b/po/nl_NL.UTF-8.po @@ -15,7 +15,7 @@ msgstr "" "X-Poedit-KeywordsList: \n" msgid "Welcome to 'remove-old-kernels' Interactive" -msgstr "Welkom bij 'oude kernels verwijderen' Interactive" +msgstr "Welkom bij 'remove-old-kernels' Interactief" msgid "Keep" msgstr "Houden" @@ -95,17 +95,29 @@ msgstr "FATAL: Kan niet lezen:" msgid "No such alternative configuration file:" msgstr "Geen dergelijk alternatief configuratiebestand:" -msgid "Usage: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" -msgstr "Gebruik: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n nummer] [-N nummer] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgid "Please use 0 or 1 for OFF and ON" +msgstr "Gebruik 0 of 1 voor UIT en AAN" + +msgid "Bad input value" +msgstr "Slechte invoerwaarde" + +msgid "INFO: Number to keep is restricted to " +msgstr "INFO: Number to keep is restricted to " + +msgid ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" +msgstr ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf" + +msgid "Usage: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" +msgstr "Gebruik: <remove-old kernels|rok> [-a] [-A <1|0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n nummer] [-N nummer] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]" msgid " -a = automatic, no questions. Interactive if not specified. (must be root)" msgstr " -a = automatisch, geen vragen. Interactief indien niet gespecificeerd. (moet root zijn)" -msgid " -A value = y or n to turn ON or OFF automatic weekly removal of kernels. (e.g. -Ay)" -msgstr " -A waarde = y of n om automatische wekelijkse verwijdering van kernels AAN of UIT te zetten. (bijv. -Ay)" +msgid " -A value = 1 or 0 to turn ON or OFF automatic weekly removal of kernels. (e.g. -Ay)" +msgstr " -A waarde = 1 of 0 om automatische wekelijkse verwijdering van kernels AAN of UIT te zetten. (bijv. -A1)" msgid " -c = as automatic but also checks for CRON=y in the cfg file or exits. (must be root)" -msgstr " -c = als automatisch maar controleert ook op CRON=y in het cfg-bestand of sluit af. (moet root zijn)" +msgstr " -c = als automatisch maar controleert ook op CRON=1 in het cfg-bestand of sluit af. (moet root zijn)" msgid " -t = Test mode, nothing is removed, urpme is simulated." msgstr " -t = Testmodus, niets wordt verwijderd, urpme wordt gesimuleerd." diff --git a/remove-old-kernels b/remove-old-kernels index 2f7eb0a..74f3eec 100644 --- a/remove-old-kernels +++ b/remove-old-kernels @@ -54,10 +54,10 @@ gettext $prog "$1" # Display -help usage() { -echo "$(i18n "Usage: <remove-old kernels|rok> [-a] [-A <y/n>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]")" +echo "$(i18n "Usage: <remove-old kernels|rok> [-a] [-A <1/0>] [-c] [-t] [-f 0-9] [-F 0-9] [-n number] [-N number] [-p] [-q] [-Q 0|1][-l] [-m] [-v] [-h|-?]")" echo "$(i18n " -a = automatic, no questions. Interactive if not specified. (must be root)")" -echo "$(i18n " -A value = y or n to turn ON or OFF automatic weekly removal of kernels. (e.g. -Ay)")" -echo "$(i18n " -c = as automatic but also checks for CRON=y in the cfg file or exits. (must be root)")" +echo "$(i18n " -A value = 1 or 0 to turn ON or OFF automatic weekly removal of kernels. (e.g. -A1)")" +echo "$(i18n " -c = as automatic but also checks for CRON=1 in the cfg file or exits. (must be root)")" echo "$(i18n " -t = Test mode, nothing is removed, urpme is simulated.")" echo "$(i18n " -f value = number of the alternate .cfg file to use this time only. Exits if missing.")" echo "$(i18n " -F value = number of alt .cfg file to use. This changes the ALTCFG= setting in the main .cfg file.")" @@ -65,7 +65,7 @@ echo "$(i18n " -n value = number of kernels to keep this time only. (-n5 or - echo "$(i18n " -N value = number of kernels to keep. This changes the config file setting. (e.g. -N 5)")" echo "$(i18n " -p = preview the urpme commands which would be used.")" echo "$(i18n " -q = advanced mode, this time only - see man page.")" -echo "$(i18n " -Q value = 1 or 0 (1 = ON) advanced mode, persistent. (e.g. -Q 1)")" +echo "$(i18n " -Q value = 1 or 0 (1 = ON) advanced mode, persistent. (e.g. -Q1)")" echo "$(i18n " -l = list the last 1000 lines of the log.")" echo "$(i18n " -m = mono. No colours in screen output.")" echo "$(i18n " -v = version.")" @@ -98,7 +98,7 @@ fi # Check for CRON variable in config or add default. (Some users may have early version without this feature) if ! grep -q -e "CRON=" ${maincfg}; then - echo -e "\n# # Allow cron to run 'remove-old-kernels' weekly. Replace 'y' with 'n' (lower case) to disable it.\nCRON=y" >> ${maincfg} + echo -e "\n# # Allow cron to run 'remove-old-kernels' weekly. Replace '1' with '0' to disable it.\nCRON=1" >> ${maincfg} fi # Check dnf limit before option parsing @@ -166,11 +166,20 @@ if [[ ${#} -gt 0 ]] ; then a) MODE="A" ;; A) chkroot - echo ${currcfg} - CRONN=${OPTARG} && [[ ${#CRONN} = 1 ]] && [[ "yn" =~ "$CRONN" ]] && \ - /usr/bin/sed -i "s/CRON=.*/CRON=${CRONN}/" ${currcfg} && CRON=$CRONN + # Allow y/n and 0/1 for compatability with older versions + CRONN=${OPTARG} + if [[ ${#CRONN} = 1 ]] && [[ "01ny" =~ "$CRONN" ]]; then + if [[ "ny" =~ "$CRONN" ]]; then + echo "$(i18n "Please use 0 or 1 for OFF and ON")" + exit 0 + else + /usr/bin/sed -i "s/CRON=.*/CRON=${CRONN}/" ${currcfg} && CRON=$CRONN + fi + else + echo "$(i18n "Bad input value")"; exit 1 + fi ;; - c) MODE="A" && [[ ${#CRON} -gt 0 ]] && [[ "$CRON" == "y" ]] || exit 0 + c) MODE="A" && [[ ${#CRON} -gt 0 ]] && [[ "1y" =~ "$CRON" ]] || exit 0 ;; t) DEBUG=1 ;; @@ -229,11 +238,11 @@ fi # Use dnf kernel 'number to keep' if installed if [[ $dnfNBK -gt $NBK ]] || $dnfmsg; then NBK=$dnfNBK - dnfmssg="${InfoCol}INFO: Number to keep is restricted to $dnfNBK, by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf${Normal}" + dnfmssg="${InfoCol}$(i18n "INFO: Number to keep is restricted to ")${dnfNBK}$(i18n ", by the dnf 'installonly_limit' set in /etc/dnf/dnf.conf")${Normal}" fi # Get info for status message -if [[ "$CRON" == "y" ]]; then autostat="ON"; else autostat="${Normal}${WarnBgCol}OFF${HdBgCol}"; fi +if [[ "$CRON" == "1" ]]; then autostat="ON"; else autostat="${Normal}${WarnBgCol}OFF${HdBgCol}"; fi if [[ "$QA" == "1" ]]; then qamssg="| Q:ON "; fi if [[ $ALTCFG -gt 0 ]]; then cfgmssg="|${Normal}${WarnBgCol}F:${ALTCFG}${HdBgCol} "; fi diff --git a/remove-old-kernels.cron b/remove-old-kernels.cron index df583d8..a5c0098 100644 --- a/remove-old-kernels.cron +++ b/remove-old-kernels.cron @@ -13,6 +13,6 @@ if [[ -x /usr/sbin/remove-old-kernels ]]; then cat $roktmplog > /var/log/remove-old-kernels.log && rm -f $roktmplog ) || fail="WARNING: log trim failed" fi echo -e "\n=========================== $(date +%d/%m/%Y-%H:%M) ===========================\n$fail" >> /var/log/remove-old-kernels.log -# Use -c option to check that CRON=y is in the cfg file before running in auto mode. +# Use -c option to check that CRON=1|y is in the cfg file before running in auto mode. /usr/sbin/remove-old-kernels -c -m >> /var/log/remove-old-kernels.log fi |