diff --git a/lib/utils.sh b/lib/utils.sh index d8b520c..3e7db46 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -318,7 +318,12 @@ is_mounted() { has_mount_option() { local PARTITION=$1 local OPTION=$2 - if $(grep "[[:space:]]$1[[:space:]]" /etc/fstab | grep -vE "^#" | awk {'print $4'} | grep -q "$2"); then + if $(grep "[[:space:]]$PARTITION[[:space:]]" /etc/fstab | grep -vE "^#" | awk {'print $4'} | grep -q "bind"); then + local actual_partition="$(grep "[[:space:]]$PARTITION[[:space:]]" /etc/fstab | grep -vE "^#" | awk {'print $1'})" + debug "$PARTITION is a bind mount of $actual_partition" + PARTITION="$actual_partition" + fi + if $(grep "[[:space:]]$PARTITION[[:space:]]" /etc/fstab | grep -vE "^#" | awk {'print $4'} | grep -q "$OPTION"); then debug "$OPTION has been detected in fstab for partition $PARTITION" FNRET=0 else