Remount all read-only usb mounts as read-write
Some of you may have realized that USB mass storage devices attached to the PlayOn!HD are automatically mounted as read-only. In a read-only mount, you cannot write files to the drive.
The following script will remount all available USB mass storage devices (mounted in read-only mode) as read-write!
The down side is that you got to execute the script every time you plug in a new device. The script work best with View USB storage attached to A.C.Ryan PlayOn!HD over network.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/bin/sh # author: shadowandy.sg[at]gmail[dot]com <https://www.shadowandy.net> # # Simple remounting script for A.C.Ryan PlayOn!HD Media Player # # Version 1.1 # try_remount() { echo "remounting $1 as read-write" mount -o,remount,rw $1 } if [$(mount | grep /tmp/usbmounts/ | grep ro | wc -l) -eq 0 ]; then echo "no read-only usb drives found!" else echo "remounting read-only usb drives..." for remount in $(mount | grep /tmp/usbmounts/ | grep ro | cut -d " " -f3); do try_remount $remount sleep 1 done echo "all read-only usb drives mounted as read-write!" fi |
Creating the script
- Telnet and login to your A.C.Ryan PlayOn!HD
- In the command prompt window, enter “vi /tmp/hdd/root/script/remount.sh“
- In the vi window, press “i” to start edit mode
- Paste the content of the above script
- Press “<ESC>” to exit out of edit mode
- Enter “:wq” to save the script
- Enter “ls /tmp/hdd/root/script”
remount.sh should be listed as one of the files
Executing the script
- In the command window, enter “sh /tmp/hdd/root/script/remount.sh”
The script would remount existing read-only USB drives as read-write