mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 05:36:10 +00:00
freebsd-update: Correctly check if pkg(8) is present
On systems without pkg(8) installed, `command -v pkg` will return
success and falsely report that pkg(8) is present. Fix that by checking
via the `pkg -N` form.
This is missing from the final revision of D39695.
Reported by: delphij
Reviewed by: fernape, delphij
Fixes: bc0c6c9cf3
freebsd-update: Add check for kernel modules
Differential Revision: https://reviews.freebsd.org/D45292
This commit is contained in:
parent
9fc5e3fb39
commit
d76ef58d56
|
@ -667,7 +667,7 @@ upgrade_check_kmod_ports() {
|
|||
local report
|
||||
local w
|
||||
|
||||
if ! command -v pkg >/dev/null; then
|
||||
if ! pkg -N 2>/dev/null; then
|
||||
echo "Skipping kernel modules check. pkg(8) not present."
|
||||
return
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue