|
|
Play any region-coded DVD
I think there are some bad assumptions here.
"/dev/rdisk" needs to define the number for the physical drive starting with "0" (ie. /dev/rdisk0, /dev/rdisk1, etc).
The "list disks" command lists all of the volumes connected to the computer. I have 4 hard drives totalling 16 volumes (partitions). And I have a server connected. All 17 of those get counted individually by "list disks" and the result is "/dev/rdisk16" which means the external DVD drive would be counted as "/dev/rdisk17" when it gets connected. But, the 4 physical hard drives really occupy "/dev/rdisk0" thru "/dev/rdisk3" and the connected server does not use a "/dev/rdisk" mount point. So, in theory, when the external DVD drive get connected, it would occupy "/dev/rdisk4". But what if you put a DVD into the external drive but don't immediately play it? And then later you plug in another drive, say a thumb flash drive. The flash drive now becomes the last device after the external DVD drive. On my system, the DVD drive would be "/dev/rdisk4" and the flash drive would be "/dev/rdisk5". So, you then run the script, and even if the "list disks" command actually worked the way you were thinking it would, the script would then return "/dev/rdisk5" for the DVD drive even though it is really "/dev/rdisk4". You cannot assume that the DVD drive is always the last device in the chain. You need to find a more clever way to detect the real virtual device number for the DVD drive.
Play any region-coded DVD
Thanks for pointing that out.. fact is, I couldn't come up with a cleverer way! |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|