Dealing with “Installation failed” in pkgbuild caused by a preinstall/postinstall bash script

So I was writing an installer for the SmoothMouse kernel extension using pkgbuild/productbuild and there was one bug which I couldn’t get my head around for a couple of hours. Basically, Apple Installer always reported failed installation (without any useful explanation) after running a very simple bash script that unloads my kext.

…but then a moment of enlightment suddenly occured to me!

This entry was posted in Journal, SmoothMouse, Solutions and tagged , , , . Bookmark the permalink.

3 Responses to Dealing with “Installation failed” in pkgbuild caused by a preinstall/postinstall bash script

  1. Johann says:

    lol!! that’s what I call product assistance!!

  2. vi4m says:

    Please check what is the return code of sudo/kextunload.
    Instead of

    echo

    just do
    exit 0 would be good as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>