From f4991cbb97d91c69aeda582c41f04ee4150a8976 Mon Sep 17 00:00:00 2001 From: DragonMinded Date: Tue, 2 Feb 2016 05:22:42 +0000 Subject: [PATCH] Mount video directory read-only. --- scripts/mount_first_usb.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mount_first_usb.sh b/scripts/mount_first_usb.sh index df884a9..cecd478 100755 --- a/scripts/mount_first_usb.sh +++ b/scripts/mount_first_usb.sh @@ -7,12 +7,12 @@ for device in /sys/block/*/device; do if echo $(readlink -f "$device") | egrep -q "usb" ; then disk=$(echo "$device" | cut -f4 -d/) # Try the disk first. - if sudo mount -t auto /dev/$disk ${HOMEDIR}/videos 2> /dev/null ; then + if sudo mount -t auto -o ro /dev/$disk ${HOMEDIR}/videos 2> /dev/null ; then echo "Mounted /dev/$disk to ${HOMEDIR}/videos" exit fi # Try the first partition. - if sudo mount -t auto /dev/${disk}1 ${HOMEDIR}/videos 2> /dev/null ; then + if sudo mount -t auto -o ro /dev/${disk}1 ${HOMEDIR}/videos 2> /dev/null ; then echo "Mounted /dev/${disk}1 to ${HOMEDIR}/videos" exit fi