Remove "none" test to be able to manage bind mounts

This impact /var/tmp bind mount. If a device don't have a mount path
(none), the `grep` in /etc/mtab will ignore this device.
This commit is contained in:
Jeremy Gardais 2018-03-12 13:48:01 +01:00
parent 0bb95412a2
commit 57ca51b307
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
if [ "$(id -u)" -eq 0 ]; then
# get the mountpath list from fstab
for mountpath in $(grep -v -E "(^#|none)" /etc/fstab | awk '{print $2}'); do
for mountpath in $(grep -v -E "(^#)" /etc/fstab | awk '{print $2}'); do
# ensure "${mountpath}" is already mounted
if grep -q " ${mountpath} " /etc/mtab; then
mount "${mountpath}" -o remount