I'm trying to place 3 cert's on a mac by packaging them in a .dmg file. Then also including an executable script in that same .dmg that contains copy commands and what not to place the files in the correct location on the mac. I've taken the .dmg and created a mac distribution package in landesk and the pacakge will deliver the .dmg to the mac i schedule a task on, but after that nothing happens. Reading some documentation on the community site, it seems that if i have an executable file in the .dmg and deploy via policy, the policy should place the .dmg on the mac and then auto-run the executable file but thats not happening. so i tried using -exec in the Install/Uninstall portion of the package but that portion never seems to run. In the Terminal on the mac, we see the package get mounted and unmounted then result code 0, but the certs dont get placed, i dont see the install script ever getting called, it seems to just skip that step. Does anyone have any details on what the syntax for -exec is and what requirements for the install script would be?
Inside the DMG is it an .APP or a .PKG/.MPKG?
If it is an .APP then it isn't going to run it by default. It is only going to copy it to /Applications.
As for using the -exec switch you can find an example of it's use in this article: http://community.landesk.com/support/docs/DOC-22584
It's neither an .app or .pkg. its just a .dmg with 3 cert files in it and our script. i've tried calling the script with -exec but as far as i can tell, landesk never tries to call the script or even try the -exec. the terminal jjust shows it mount the package, then unmount, and thats it.
Can you post the contents of the script?
I encountered this issue as well, and it was actually related to the delivery method settings. If you are using "Display the full user interface" in the delivery method, it doesn't honor the -exec switch. What delivery method options are you using?
# The following files are bundled:
# 'redacted.org - intermediate client.cer'
# 'redacted.org - root CA.cer'
# 'redacted.org - server intermediate.cer'
cp -p "/volumes/maccerts/redacted.org - intermediate client.cer" "/volumes/macintosh hd/csd/keychains/"
cp -p "/volumes/maccerts/redacted.org - root CA.cer" "/volumes/macintosh hd/csd/keychains/"
cp -p "/volumes/maccerts/redacted.org - server intermediate.cer" "/volumes/macintosh hd/csd/keychains/"
sudo security add-trusted-cert -d -r trustAsRoot -k "/volumes/macintosh hd/Library/Keychains/System.keychain" "/volumes/macintosh hd/csd/keychains/redacted.org - intermediate client.cer"
sudo security add-trusted-cert -d -r trustAsRoot -k "/volumes/macintosh hd/Library/Keychains/System.keychain" "/volumes/macintosh hd/csd/keychains/redacted.org - root CA.cer"
sudo security add-trusted-cert -d -r trustAsRoot -k "/volumes/macintosh hd/Library/Keychains/System.keychain" "/volumes/macintosh hd/csd/keychains/redacted.org - server intermediate.cer"
We've tried Policy, Policy Push, and Push. With different delivery methods.
Can you also post the name of your DMG and the -exec command you are using?
Thats the -exec we tried last. The script is named Install and packaged at the root level of the .dmg file.
Is "Install" the name of your script? Try changing it to Install.sh and make sure it has the executable permisison (chmod +x). Then use -exec Install.sh
The exec command prepends the path of the dmg to the command in the -exec switch. So by using "./Install" you would have ended up with a path of /volumes/MacCerts/./Install which would end up with path not found and it would not run.
Yeah, its just named install. Trying -exec Install.sh after doing chmod +x results in the client terminal showing "failed to get uuid for device 234881028". The LANdesk task says sdclient.exe or the isntallation program was terminated at the client. Would anti-virus possibly be stopping it? We just have the client sitting there and we aren't cancelling anything.