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


Click here to return to the 'Mount and unmount FireWire drives via shell script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Mount and unmount FireWire drives via shell script
Authored by: randyharris on Jul 13, '07 09:56:04PM

Can somebody help me change this a little bit, I would like to specify one of my FW drives to mount and unmount, not all of them.

Thanks much



[ Reply to This | # ]
Mount and unmount FireWire drives via shell script
Authored by: hints_hinterton on Feb 08, '08 10:16:44PM

It's been awhile but these modifications worked for me to specify the drive:

mount
#!/bin/bash
system_profiler SPFireWireDataType | grep -A4 "<yourdrivename>" | \
grep "BSD Name: disk" | sed -e "s/^.*: //" | \
(while read i; do /usr/sbin/diskutil mountDisk $i; done)

unmount
#!/bin/bash
system_profiler SPFireWireDataType | grep -B1 "Mount Point: \/Volumes\<yourdrivename>" | \
grep "BSD Name: disk" | sed -e "s/^.*: //" | \
(while read i; do /usr/sbin/diskutil unmountDisk $i; done)



[ Reply to This | # ]