Deploying applications to MAC

(imported topic written by pdentremont91)

Hi,

I’m fairly new to Macs and am having a really rough time getting a certain application to install on macs thru bigfix.

I have an application that needs to install running a perl script nested under AgentSetup.mpkg/Contents/Resources/install not the standard installer -pkg method or it doesn’t configure the activation xml file needed for activation and activate the account during the install -pkg process.

It runs fine from terminal using:

sudo AgentSetup.mpkg/Contents/Resources/install FIRSTBACKUP=1

so i tried to sub(after tracking down the mountpoint):

Wait sh /private/tmp/BESMNTPT7925891237138389/AgentSetup.mpkg/Contents/Resources/install FIRSTBACKUP=1

for the wait installer -pkg section bellow.

I have run it through wizard initially and this is what it gave me.

download http://mainbigfixserver.company.com:52311/Uploads/4a793490497aebaa44a6d3bfcb6b2af7055113b8/Connecteddmg.tmp

continue if {(size of it = 19668011 AND sha1 of it = “4a793490497aebaa44a6d3bfcb6b2af7055113b8”) of file “Connecteddmg.tmp” of folder “__Download”}

extract Connecteddmg.tmp

wait sh -c “rm ‘/tmp/Connected.dmg’”

move “{posix path of file “Connected.dmg” of folder “__Download” of client folder of current site}” “/tmp/Connected.dmg”

wait hdiutil attach -quiet -private -mountpoint “/tmp/BESMNTPT7925891237138389” “/tmp/Connected.dmg”

if {not active of action OR (exists folder whose (name of it ends with “.mpkg”) of folder it OR exists folder whose (name of it ends with “.pkg”) of folder it) of ("/tmp/" & “BESMNTPT7925891237138389”)}

wait installer -pkg “{(if (exists folder whose (name of it ends with “.mpkg”) of folder it) then (it & “/” & name whose (it ends with “.mpkg”) of folders of folder it) else (it & “/” & name whose (it ends with “.pkg”) of folders of folder it)) of (”/tmp/" & “BESMNTPT7925891237138389”) }" -target /

*********Removed irrelevant stuff **********************

end if

  • Removed irrelevant stuff **********************

After two weeks of every free moment of trying to get this to work, any assistance would be greatly appreciated.

Thanks,

Peter d’Entremont

(imported comment written by NoahSalzman)

Peter,

Do you think that if we can get a variant of this line working:

Wait sh /private/tmp/BESMNTPT7925891237138389/AgentSetup.mpkg/Contents/Resources/install FIRSTBACKUP=1

That you will be OK? Is that the crux of the problem?

(imported comment written by pdentremont91)

Hi Noah,

Yes, this command works fine directly on the mac minus the Wait and sh.

Thanks,

Peter

(imported comment written by NoahSalzman)

Please try:

wait /bin/sh -c “/private/tmp/BESMNTPT7925891237138389/AgentSetup.mpkg/Contents/Resources/install FIRSTBACKUP=1”

You might try /bin/bash as well. Just guessing.

(imported comment written by pdentremont91)

I"m trying the first one now. It takes a while for the macs to pick it up. If this doesn’t work i will try bin/bash.

(imported comment written by pdentremont91)

Thanks Noah. Worked perfectly!