Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.4: Compact sparse disk images via contextual menu' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Compact sparse disk images via contextual menu
Authored by: GlowingApple on Sep 11, '09 02:46:32PM
Sorry for the multiple posts, but I think I found a way to fix the encrypted image issues without having to store the password or post it in the clear in the script.

It seems that hdiutil prompts for a password from stdin by default. So the script will run, receive no input, and error out from an authentication failure. If you give hdiutil no option for input (by directing input from something like /dev/null), then it resorts to a graphical password prompt.

Use this code in the script and it should prompt for the password each time:
hdiutil compact $@ </dev/null


[ Reply to This | # ]