WizardKit/scripts/remount-rw

21 lines
338 B
Bash
Executable file

#!/bin/bash
#
## WizardKit: 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
exit 0