Skip to content

Commit

Permalink
print a warning if /proc is not mounted
Browse files Browse the repository at this point in the history
the bash idiom <(foo) relies on the /dev/fd -> /proc/self/fd symlink

if /proc is not mounted, dkms status (and other actions) may fail with

   /usr/sbin/dkms: line ####: /dev/fd/##: No such file or directory

https://bugs.debian.org/810665
  • Loading branch information
anbe42 authored and evelikov committed Apr 20, 2023
1 parent 61e2ad3 commit 5111f9c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dkms.in
Original file line number Diff line number Diff line change
Expand Up @@ -2519,6 +2519,12 @@ done

# Sanity checking

# The <(cmd) idiom does not work if /proc is not mounted
read line < <(echo "Hello, DKMS!")
if [ "$line" != "Hello, DKMS!" ]; 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." \
Expand Down

0 comments on commit 5111f9c

Please # to comment.