Re: hdiutil behavior in automated scripts
Re: hdiutil behavior in automated scripts
- Subject: Re: hdiutil behavior in automated scripts
- From: Esteban Barahona <email@hidden>
- Date: Fri, 29 May 2009 08:10:54 -0600
sure, there is a 1/2 chance that it will work using pure luck.
_/5/29 Brian Bergstrand
<email@hidden>
On May 29, 2009, at 5:01 PM, Michael Plagge wrote:
Hi,
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:
hdiutil: create: returning 6
hdiutil: create failed - device not configured [translated]
...
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.
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 (
email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden