“I love it when companies break away from the standard pkg practices.”
– No one ever
When you run into an installer that is doing something you don’t expect or recommend we get to put on our Mac admin spelunking hat to dive into the depths of the installer to see what’s going on. There are some handy tools that make this easier already bundled in the OS. Those are: pkgutil and installer. There are also good 3rd party apps like Pacifist and Suspicious Package that I use for examining installers as well. For this exercise I didn’t need those.
I ran into an issue with the Fiery E-22C driver installer from EFI launching an app mid-install to offer to setup printers.
That’s great for home users with a Fiery front end (who doesn’t have a Fiery at home?) but not for deploying in the enterprise. The only way to get the drivers to install at this point was to click the link in the bottom left of the app window. Not ideal. I tried many ways to bypass the “wizard” app as the installer existed but even when attempting a CLI install it would launch the app when a user was logged and the install would totally fail if no user was logged in.
One thing going for us at this point is the pkg is a flat package. Running the following will extract the pkg to better examine it:
pkgutil --expand ~/Desktop/Fiery\ Printer\ Driver.pkg ~/Desktop/fieryprinterdrivers
Navigating to ~/Desktop/fieryprinterdrivers shows us the expanded package contents:
Right click on the “FieryPrinterDriverInstaller.pkg” and choose “Show Package Contents”:
After digging around the piece that needed adjustments was the postinstall. There was a system version check in there to launch the “wizard” if the OS was 10.5 or older. If 10.5 or older it would just install the drivers. That’s what I wanted on my new shiny OS!
#Pkg installs driver and exits in 10.5 since no Wizard is supported below 10.6 if [ "$MAJOR" = "10" ] && [ "$MINOR" = "5" ] then logger "Postinstall Script: Checking for previous driver and printers with FSU and performing system cleanup" /bin/sh /tmp/efi_wiz_fsu_delete && logger "Postinstall Script: FSU done" sudo rm -f /tmp/efi_wiz_fsu_delete logger "Postinstall Script: Installing driver only for 10.5" && sudo installer -pkg /tmp/Fiery\ Printer\ Driver\ Installer.app/Contents/Resources/User\ Software/OSX/Printer\ Driver/OSX\ installer.pkg -target / && exit 0 fi
Further down if the OS was > 10.5 it would launch the “wizard” which is what I didn’t want. To fix this install postinstall script all I needed to do was remove the OS Minor version check to make it just install the drivers if the OS Major version is 10. I can handle deploying the drivers to the appropriate OS so I’m not worried about using their logic.
From: if [ "$MAJOR" = "10" ] && [ "$MINOR" = "5" ] to if [ "$MAJOR" = "10" ]
Once the postflight file is adjusted we can flatten the package back up again by running:
pkgutil --flatten ~/Desktop/fieryprinterdrivers/ ~/Desktop/Fiery\ Printers\ Driver\ Fixed.pkg
And now I have a new package “Fiery Printers Driver Fixed.pkg” that’s deployable, won’t launch the wizard, and will install the drivers.