diff --git a/akmods b/akmods index 9af6046..cdaa39a 100644 --- a/akmods +++ b/akmods @@ -172,7 +172,7 @@ cleanup_cachedir () local excluded excluded=$(find /boot -name 'vmlinuz-*' '!' -name '*rescue*' 2>/dev/null | sed 's/.*vmlinuz-//') local -a file_list - mapfile -t file_list < <(find /var/cache/akmods -mindepth 2 -type f -not -name .last.log 2>/dev/null | grep -Fv -f <(echo "${excluded}")) + mapfile -t file_list < <(find /var/cache/akmods -mindepth 3 2>/dev/null | grep -Fv -f <(echo "${excluded}")) for one_file in "${file_list[@]}"; do if grep -q ".*\.rpm$" <<< "${one_file}" ; then if ! rpm -q "$(basename "${one_file%.rpm}")" >/dev/null ; then diff --git a/akmods-kmodgenca b/akmods-kmodgenca index eab0882..dafe69b 100644 --- a/akmods-kmodgenca +++ b/akmods-kmodgenca @@ -433,12 +433,6 @@ function create_cacert_config() { # Set '-batch' argument. AUTOMATIC_BUILD_OPTION="-batch" - local cert_country_code=$(locale country_ab2) - if [[ -z ${cert_country_code} ]]; then - echo -e "${BOLD_YELLOW_TEXT}WARNING:${CLEAR_TEXT} COULD NOT DETECT COUNTRY CODE FROM LOCALE; USING FALLBACK VALUE: US" >&2 - cert_country_code=US - fi - # Utilise default values if 'AUTOMATIC_BUILD' is equal to '1'. # - Set OpenSSL field values. # - Comment default and min/max values. @@ -447,7 +441,7 @@ function create_cacert_config() { -e "s#\(emailAddress *= \).*#\1akmods@${cert_hostname}#" \ -e "s#\(localityName *= \).*#\1None#" \ -e "s#\(stateOrProvinceName *= \).*#\1None#" \ - -e "s#\(countryName *= \).*#\1${cert_country_code}#" \ + -e "s#\(countryName *= \).*#\1$(locale country_ab2)#" \ -e "s#\(commonName *= \).*#\1${KEYNAME}#" \ -e "s/^[^#]*_default *= /#&/" \ -e "s/^[^#]*_min/#&/" \