From 0285b2ad62086f868c23414fe46d0ccdcbe8c6db Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Fri, 31 Mar 2023 09:45:00 +0200 Subject: [PATCH] print a warning if /proc is not mounted --- dkms.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dkms.in b/dkms.in index 3f5fc41..6a52a55 100644 --- a/dkms.in +++ b/dkms.in @@ -672,7 +672,7 @@ get_module_verinfo(){ ;; esac done < <(modinfo "$1") - + echo -E "${ver}" # Use obsolete checksum info if srcversion is not available echo -E "${srcver:-$checksum}" @@ -767,7 +767,7 @@ check_version_sanity() return 0 fi local dkms_module=$(compressed_or_uncompressed "$dkms_tree/$module/$module_version/$1/$2/module/" "${4}") - + local cmp_res="$(compare_module_version "${kernels_module}" "${dkms_module}")" if [[ "${cmp_res}" = ">" ]]; then if [[ ! "$force" ]]; then @@ -2499,6 +2499,11 @@ done # Sanity checking +# The <(cmd) idiom does not work if /proc is not mounted +if [ ! -e <(echo) ]; then + warn $"dkms will not function properly if /proc is not mounted." +fi + # Error out if binaries-only is set and source-only is set if [[ $binaries_only && $source_only ]]; then die 8 $" You have specified both --binaries-only and --source-only." \ -- 2.20.1