From 1e717d44e102b39775f318d6ea9a0753822ae922 Mon Sep 17 00:00:00 2001 From: Dalibor Pospisil Date: Feb 04 2015 10:35:08 +0000 Subject: ability to remount --- diff --git a/do-remount-if-already-mounted.patch b/do-remount-if-already-mounted.patch new file mode 100644 index 0000000..fba2238 --- /dev/null +++ b/do-remount-if-already-mounted.patch @@ -0,0 +1,31 @@ +From 0474dc962be56f7292e595423c092c3d4117eb99 Mon Sep 17 00:00:00 2001 +From: Dalibor Pospisil +Date: Fri, 12 Dec 2014 15:25:56 +0100 +Subject: [PATCH 1/5] __INTERNAL_Mount: do remount if already mounted and + options specified + +If option 'rw' is specified, automatically prepend 'remount' to options if it is not already present. +--- + src/infrastructure.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/infrastructure.sh b/src/infrastructure.sh +index e911fc9..29a5d43 100644 +--- a/src/infrastructure.sh ++++ b/src/infrastructure.sh +@@ -86,8 +86,12 @@ __INTERNAL_Mount(){ + + if __INTERNAL_CheckMount "$MNTPATH" + then ++ if [[ -z "$OPTIONS" ]]; then + rlLogInfo "$WHO already mounted: success" + return 0 ++ else ++ [[ "$OPTIONS" =~ remount ]] || OPTIONS="remount,$OPTIONS" ++ fi + elif [ ! -d "$MNTPATH" ] + then + rlLogInfo "$WHO creating directory $MNTPATH" +-- +1.9.3 +