mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-10-04 05:57:13 +00:00
pve7to8: fix broken pipe warning for dkms status invocation
The check for dkms kernel modules relies on the output of `dkms status`. dkms command invocation will perform the following sanity check: ``` if [ ! -e <(echo) ]; then warn $"dkms will not function properly if /proc is not mounted." fi ``` This check will however throw the following warning when SIGPIPE is set to be ignored: ``` sbin/dkms: line 2497: echo: write error: Broken pipe ``` While only cosmetic, this can be confusing. Therefore, temporarily enable SIGPIPE before calling dkms, restoring the originally setting afterwards. Reported-by: Alexander Zeidler <a.zeidler@proxmox.com> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
e913f15d3b
commit
2bbf10d9ef
@ -1356,9 +1356,12 @@ sub check_dkms_modules {
|
||||
$count = scalar @_;
|
||||
};
|
||||
|
||||
my $sig_pipe = $SIG{PIPE};
|
||||
$SIG{PIPE} = "DEFAULT";
|
||||
my $exit_code = eval {
|
||||
run_command(['dkms', 'status', '-k', '`uname -r`'], outfunc => $set_count, noerr => 1)
|
||||
};
|
||||
$SIG{PIPE} = $sig_pipe;
|
||||
|
||||
if ($exit_code != 0) {
|
||||
log_skip("could not get dkms status");
|
||||
|
Loading…
Reference in New Issue
Block a user