summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/utils/mount_glusterfs.in
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/utils/mount_glusterfs.in')
-rwxr-xr-xxlators/mount/fuse/utils/mount_glusterfs.in23
1 files changed, 12 insertions, 11 deletions
diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in
index 473ecace9..b12b4e04e 100755
--- a/xlators/mount/fuse/utils/mount_glusterfs.in
+++ b/xlators/mount/fuse/utils/mount_glusterfs.in
@@ -2,14 +2,14 @@
# (C) 2008 Gluster Inc. <http://www.gluster.com>
#
# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Affero General Public License as
+# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
+# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
@@ -25,11 +25,11 @@ _init ()
LOG_CRITICAL=CRITICAL;
LOG_ERROR=ERROR;
LOG_WARNING=WARNING;
- LOG_NORMAL=NORMAL;
+ LOG_INFO=INFO;
LOG_DEBUG=DEBUG;
# set default log level to ERROR
- log_level=$LOG_NORMAL;
+ log_level=$LOG_INFO;
}
start_glusterfs ()
@@ -43,8 +43,8 @@ start_glusterfs ()
"ERROR")
log_level=$LOG_ERROR;
;;
- "NORMAL")
- log_level=$LOG_NORMAL;
+ "INFO")
+ log_level=$LOG_INFO;
;;
"DEBUG")
log_level=$LOG_DEBUG;
@@ -59,8 +59,8 @@ start_glusterfs ()
log_level=$LOG_NONE;
;;
*)
- echo "invalid log level $log_level_str, using NORMAL";
- log_level=$LOG_NORMAL;
+ echo "invalid log level $log_level_str, using INFO";
+ log_level=$LOG_INFO;
;;
esac
fi
@@ -85,7 +85,7 @@ start_glusterfs ()
--volfile-server-transport=$transport");
else
cmd_line=$(echo "$cmd_line \
---volfile-server=$server_ip \
+--volfile-server=$server_ip");
fi
else
cmd_line=$(echo "$cmd_line --volfile=$volfile_loc");
@@ -165,14 +165,15 @@ main ()
# TODO: use getopt. This is very much darwin specific
volfile_loc="$1";
- while [ "$volfile_loc" == "-o" ] ; do
+ while [ "$volfile_loc" = "-o" ] ; do
shift ;
shift ;
volfile_loc="$1";
done
[ -r "$volfile_loc" ] || {
- server_ip=$(echo "$volfile_loc" | sed -n 's/\([^\:]*\).*/\1/p');
+ server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:.\-]*\):.*/\1/p');
+ volume_id=$(echo "$volfile_loc" | sed -n 's/[a-zA-Z0-9:.\-]*:\(.*\)/\1/p');
volfile_loc="";
}
# following line is product of love towards sed