Unable to run pkg(8) - a mksh(1) or kernel quirk?

As root I get the following error
# pkg search screen-4.8.0
mksh: pkg: inaccesible or not found
# env -i pkg search screen-4.8.0
env: pkg: No such file or directory

Switching to sh(1) somehow solves the issue
# env -i /bin/sh -c "pkg search screen-4.8.0"
screen-4.8.0 Multi-screen window manager
# pkg search screen-4.8.0
screen-4.8.0 Multi-screen window manager

The current system is FreeBSD 12.2 with a custom kernel. The console is vt(4) without a KMS driver. The problem happened after a new kernel. I think the kernel compile is the most likely cause - the kernel config is a mess and I'll be correcting it right now.
 
No. The above cli lines actually happened just so. I'm not able to take a screenschot, but still has the console preserved. From a previous session I also used ktrace(1) and wrote a description, see attached plaintext file buglog.txt. That session 'showcase' a different quirk where the issue is solved by root calling su(1) <some_user_also_using_mksh>.
 

Attachments

  • buglog.txt
    5.9 KB · Views: 75
Back
Top