summaryrefslogtreecommitdiffstats
path: root/xlators/mount
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-03-24 04:05:16 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-24 05:42:25 -0700
commit08fd3a63f56c3bae0cbf57d59a3e4c32da791312 (patch)
treee4e2c0d46193a9099accc88d064c114906a4d9bb /xlators/mount
parent3f8dc989b71977c2e3f94482b21be92b8562ea83 (diff)
mount script has new option '-o ro'
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 712 (mount.glusterfs script doesn't handle 'ro' option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=712
Diffstat (limited to 'xlators/mount')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index bf43525ec00..0ea0bdd8c6e 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -67,6 +67,10 @@ start_glusterfs ()
fi
cmd_line=$(echo "$cmd_line --log-level=$log_level");
+ if [ -n "$read_only" ]; then
+ cmd_line=$(echo "$cmd_line --read-only");
+ fi
+
if [ -n "$log_file" ]; then
cmd_line=$(echo "$cmd_line --log-file=$log_file");
fi
@@ -150,6 +154,8 @@ main ()
log_file=$(echo "$options" | sed -n 's/.*log-file=\([^,]*\).*/\1/p');
+ read_only=$(echo "$options" | sed -n 's/.*\(ro\)[^,]*.*/\1/p');
+
transport=$(echo "$options" | sed -n 's/.*transport=\([^,]*\).*/\1/p');
direct_io_mode=$(echo "$options" | sed -n 's/.*direct-io-mode=\([^,]*\).*/\1/p');
@@ -198,6 +204,7 @@ main ()
-e 's/[,]*server-port=[^,]*//' \
-e 's/[,]*volume-id=[^,]*//' \
-e 's/[,]*log-server=[^,]*//' \
+ -e 's/[,]*ro[^,]*//' \
-e 's/[,]*log-server-port=[^,]*//');
#