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


Click here to return to the 'The script also mounts!' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
The script also mounts!
Authored by: mlm on Mar 27, '04 04:51:58PM

These eject scripts -- and the technologies they use -- only eject; the bash script originally posted also mounts. I have a large but whiny Firewire drive I use only for my iTunes library. I like to mount it and dismount it according to whether I'm using it with iTunes or not. There are various little utilities out there for unmounting disks, but I don't think I've seen one that remounts and unmounted one. And I use the shell a lot, so this is perfect for what I want.

In fact, I was stuck for a name when I put this script in a file on my machine: it mounts the volume if unmounted, and unmounts the volume if mounted, so it "toggles" the mount status of the disk, but "toggle" is a bit weak a word here. I tried "switchmount", but too long and "flipmount", but too hokey. Ended up with "switchvol", which is OK, but not great -- suggestions?

Actually, it doesn't really matter what I called it because I made a shell alias whose name was the same as the disk, so now I can mount/unmount my iTunes library disk with just a one-word command.

Thanks for working this out. There are a lot of ways to get at volume information, and it isn't always easy to find what you want in a reasonable form. The approach here is direct (maybe even crude), but it would be difficult to improve on it. I could use Mount Me! (or something like it) to mount my disk and DocJector (or something like) to eject it, which I do sometimes, but when I know which disk I want to mount/unmount, and I switch frequently I'd be just as happy to have a direct shell script.

---
--- Mitchell



[ Reply to This | # ]