Skip to content

Commit 0474dc9

Browse files
committed
__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.
1 parent f7fb8c9 commit 0474dc9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/infrastructure.sh

+4
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ __INTERNAL_Mount(){
8686

8787
if __INTERNAL_CheckMount "$MNTPATH"
8888
then
89+
if [[ -z "$OPTIONS" ]]; then
8990
rlLogInfo "$WHO already mounted: success"
9091
return 0
92+
else
93+
[[ "$OPTIONS" =~ remount ]] || OPTIONS="remount,$OPTIONS"
94+
fi
9195
elif [ ! -d "$MNTPATH" ]
9296
then
9397
rlLogInfo "$WHO creating directory $MNTPATH"

0 commit comments

Comments
 (0)