WizardKit/.linux_items/archlive/airootfs/usr/local/bin/remount-rw
2017-12-06 18:10:39 -08:00

22 lines
322 B
Bash

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