I ran into an issue with Adobe Photoshop CS6 installer and had to use the installPKGfromDMG.sh script to install, that solved one problem, but created another.
After the install was finished, there was still a $dmgName.dmg.shadow and a $dmgName.dmg.cache.xml. I went back and modified the installPKGfromDMG.sh to get rid of all instances of the $dmgName, thought I would share here if someone else sees this or has problems with it.
# Delete the DMG
/bin/rm /Library/Application Support/JAMF/Waiting Room/$dmgName*
Chris
