WizardKit/.bin/Scripts/remount-rw
2017-12-17 21:22:53 -07:00

23 lines
349 B
Bash
Executable file

#!/bin/bash
#
## Wizard Kit: Volume remount tool
if ! mount | grep -q "$1"; then
echo "ERROR: Can't remount $1"
sleep 2s
exit 1
fi
DEVICE=$(mount | grep "$1" | cut -d' ' -f1)
# Remount read-write
echo "Remounting: $DEVICE"
udevil umount $DEVICE
if udevil mount $DEVICE; then
echo "Done"
else
echo "Failed"
fi
sleep 2s
exit 0