scripts/remount

19 lines
362 B
Bash
Executable File

#!/bin/sh
# Remount with default value from /etc/fstab all mountpath
if [ $(id -u) -eq 0 ]; then
# Nok:
#mount -a -o remount
# OK:
#mount ${mountpath} -o remount
# OK:
#if [ $(mountpoint -q "${mountpath}") ]; then mount "${mountpath}" -o remount; fi
# Get the mountpath list
grep -v "^#" /etc/fstab | awk '{print $2}'
else
sudo $0
fi
exit 0