Running sudo command in post install script from .pkg file (to install a kext)

1k Views Asked by At

I'm using Packages to create an installer that places a .kext file in /Library/Extensions. Then, my post-install.sh file tries to load it as such:

#!/bin/bash

sudo kextload /Library/Extensions/mykext.kext

I tested my installer, but I get a fail at the end:

enter image description here

However, if I run kextstat | grep mykext in terminal, I can see that my kext was actually successfully loaded and placed at its destination path. (I deleted and unloaded the kernel extension beforehand, so I know install is working).

So my questions are: Is there a way to diagnose why the installation failed? Is this just because certificate signing?

Noteworthy:

1

There are 1 best solutions below

0
user339946 On BEST ANSWER

I was able to view the Installer logs via Window > Show Installer Logs.

I believe the issue was that I was pointing to a symbolic link of the kext file, rather than its true path.