Re: how to eject a firewire drive natively
Re: how to eject a firewire drive natively
- Subject: Re: how to eject a firewire drive natively
- From: Axel Luttgens <email@hidden>
- Date: Sun, 11 Apr 2004 18:32:17 +0200
(oh gosh again forgot to reply to the list instead of to the poster...
sorry Paul)
Paul Berkowitz wrote:
>
On 4/10/04 9:42 PM, "Graff" <email@hidden> wrote:
>
>
>
>[...]
>
>
>
>
It's likely something very basic:
>
>
[...]
>
Yes, it must be , and that's why we are trying to find an explanation :-)
As Graff already told it, he tried any variations about shell and
environment settings; with no success.
I did the same on my side, also checked the real/effective uid/gid, and
anything else that could be relevant to the problem (well, anything I
could think about - and yes, thanks, I know, I'm rather limited :-( ).
>
>
>
Then again, it may be due to the result that AppleScript returns not being
>
in the correct stream. That's quite likely since you say that
>
>
do shell script "diskutil eject " & posixPath & "> /dev/null 2>&1 &"
>
>
ending in "> /dev/null 2>&1 &" is what works.
>
Above holds when the command you're trying really needs to be executed
in a daemon mode or, at least, in a detached fashion.
The question here is: why damn should "disk util eject /Volumes/volname"
need to be executed in the background while executed from a "do shell
script" command?
Just to make that point clear, this one "works":
do shell script "diskutil eject /Volumes/volname; echo hello"
even if it doesn't truly eject the volume. One gets "hello" on stdout,
command "diskutil" gets terminated from a "do shell script" point of view.
>
It makes no difference if you
>
consider it a workaround, if in fact it's actually the solution.
>
No, because there is potentially something to be learnt here.
>
There are
>
about 500 messages about this in the archives, with this solution being
>
presented many times for various shell scripts, several times with
>
explanations by Chris Nebel and others. Somebody will probably repeat the
>
explanation again. Or you could try searching teh archives (yes, I know).
>
Thanks, but I did (and I'm sure Graff did too). [1]
But this is no real explanation for above question, unless I'm missing
something (and that's allways possible: I never felt so humble as when
daring such declarations: it often proved I was wrong...)
Now, the interesting part is that one.
While calling "diskutil", it seems that this one calls
"DiskManagementTool" in turn.
Once terminated, "DiskManagementTool" quits and so "diskutil" does too.
Now, when called from "do shell script", it seems that "umount" gets
called too, but afterwards, when "diskutil" has already left.
On the other hand, when executed from the shell, I couldn't observe such
a call to "umount".
So, again, my feeling is that one may learn something here, instead of
just saying "if it works in the background, that's OK".
Your very humble,
Axel
[1] And that figure of 500 could be somewhat overstated. Hum. ;-)
Sorry, couldn't resist to tease your exasperation.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.