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


Click here to return to the 'Dangerous to rewrite umount' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Dangerous to rewrite umount
Authored by: googoo on Feb 09, '11 11:50:02AM

It is generally not a good idea to replace system executables like umount. A better idea would be to give your script a different name like umdos or something and move it to a directory in your path. You would call it by its name to use it. This way there are no unintended consequences when something else uses umount.

-Mark



[ Reply to This | # ]
Dangerous to rewrite umount
Authored by: lsloan on Feb 10, '11 09:36:40AM

I agree, it's dangerous! :)

That danger is why I put the cautioning message in my hint. This hint is not for the faint of heart.

I purposely wanted to replace umount with this script because I wanted it to execute automatically whenever the user ejects a disk. So this works whenever the user chooses any of the Mac OS X eject methods (eject icon, menu items, etc.).

I think that if one wanted a good solution that doesn't replace umount, look at the one suggested by user "joeyblades" here:

http://hints.macworld.com/comment.php?mode=view&cid=122757

Otherwise, one of the droplet or helper applications mentioned in these comments might be a good choice.

---
Lance E Sloan



[ Reply to This | # ]