Creating a custom package to deploy

65 views
Skip to first unread message

Jesse Murphy

unread,
Mar 29, 2017, 4:32:48 PM3/29/17
to Simian Discuss
There's got to be a way to do this:

I have a 7MB shell script that deploys a McAfee agent on our Macs. I want to deploy via Simian, now that I have my server running correctly.

The shell script needs an argument to install (./install.sh -i).

I've been working on creating a .pkg file using pkgbuild that copies the install.sh into /Library/Scripts/McAfee/, then uses a preinstall script to check for existing installation, then a postinstall script to execute the ./install.sh -i.

Seeing how Simian uses DMG and pkginfo plists, my .pkg doesn't look like it will work.

Has anyone here done anything similar, or know how I could create a DMG and plist that would work with what I've already done?

Jesse Murphy

unread,
Mar 29, 2017, 8:07:18 PM3/29/17
to Simian Discuss
Got this figured out, and in case anyone else comes along looking for similar info...

I used this method to make sure our McAfee ePO agents are getting deployed:

  • Use pkgbuild to create a pkg
    • preinstall script checks for the /etc/cma.d/EPOAGENT3700MACX/config.xml (probably unnecessary, as the pkginfo does this again later)
    • have the pkg deploy the install.sh script to /Library/Scripts/McAfee
    • postinstall script just calls the deployed /Library/Scripts/McAfee/install.sh -i 
  • Wrap the pkg in a DMG
  • Use makepkginfo on the DMG to generate the pkginfo plist
    • Modify the XML to include the <key>preinstall_script</key>, with the script set to check for the same config.xml as above, so Simian doesn't keep trying to deploy the package every time
  • Upload to Simian


Reply all
Reply to author
Forward
0 new messages