HomeFreeBSD

freebsd-update: Correctly check if pkg(8) is present

Description

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: bc0c6c9cf3a9 freebsd-update: Add check for kernel modules
Differential Revision: https://reviews.freebsd.org/D45292