2018-03-12 10:02:02 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Remount with default values from /etc/fstab all mountpath
|
|
|
|
|
|
|
|
if [ "$(id -u)" -eq 0 ]; then
|
|
|
|
# get the mountpath list from fstab
|
2018-03-12 13:48:01 +01:00
|
|
|
for mountpath in $(grep -v -E "(^#)" /etc/fstab | awk '{print $2}'); do
|
2018-03-12 10:02:02 +01:00
|
|
|
# ensure "${mountpath}" is already mounted
|
|
|
|
if grep -q " ${mountpath} " /etc/mtab; then
|
|
|
|
mount "${mountpath}" -o remount
|
|
|
|
#printf '%b\n' "mount ${mountpath} -o remount"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
else
|
|
|
|
sudo "${0}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|