scripts/remount

19 lines
362 B
Plaintext
Raw Permalink Normal View History

2016-10-14 09:40:07 +02:00
#!/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