Re: hdiutil behavior in automated scripts
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On May 29, 2009, at 5:01 PM, Michael Plagge wrote: Hi, hdiutil: create: returning 6 hdiutil: create failed - device not configured [translated] ... I don't know if there's a way to get around this. Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2 _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I would like to use hdiutil to automatically create disk images that are to be provided by a web server running on OS 10.4.11. When testing the functionality, everything works as expected, given this example command (for a yet empty image): echo -n "pass" | /usr/bin/hdiutil create -ov -encryption -stdinpass - size 1m output.dmg -fs HFS+ The problem occurs when trying to execute this as the web server. I put this command sequence into an executable shell file which is called by PHP's exec() function. The disk image is simply not created as I get error messages like this: I would like to know if there is something environmentally that I missed out by just asking for hdiutil executed by the web server / PHP. I also came across a post from Kevin Harris (http://lists.apple.com/archives/darwin-dev/2004/Oct/msg00044.html ) that seems to have a similar background, but this has not been answered at all. Read up on OS X bootstrap domains. There is a system domain (where the web server runs) and one domain for each user (there may be others as well). When you run the command manually from Terminal you are running in your user domain and everything works as expected. When the web server runs the command it's running in the system domain where some services are not available. This email sent to site_archiver@lists.apple.com
participants (1)
-
Brian Bergstrand