summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-03-07 08:10:06 -0500
committerRaghavendra Bhat <raghavendra@redhat.com>2015-03-07 07:14:47 -0800
commitd494bec041d3581d8ed8f987929ab7b3a8cfb1a9 (patch)
treea7d5530bd2f34f61fd8f2222664b63ecea7d1c51
parent4a49d0bf260d000aeae185f9f21f589a6ee01618 (diff)
Replace /dev/stderr with >&2 in mount scripts
/dev/stderr is not available on boot in CentOS 7 and thus mounting anything from /etc/fstab at boot time fails. Instead of using /dev/stderr, the standard error redirection ">&2" is being used. Cherry picked from commit adef0c8860f57c8137382d848244009e9a584497: > Change-Id: I15d07cd49e6b0392331047edb441925f48047b2b > BUG: 1199545 > Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org> > Reviewed-on: http://review.gluster.org/9824 > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra Talur <rtalur@redhat.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> Change-Id: I15d07cd49e6b0392331047edb441925f48047b2b BUG: 1199577 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9826 Reviewed-by: Nico Schottelius <nico-gluster-users@schottelius.org> Tested-by: Nico Schottelius <nico-gluster-users@schottelius.org> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in10
-rwxr-xr-xxlators/mount/fuse/utils/mount_glusterfs.in11
2 files changed, 12 insertions, 9 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index 68d452c142e..4348533b1a2 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -1,6 +1,8 @@
#!/bin/sh
#
# Copyright (c) 2013 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (c) 2015 ungleich GmbH <http://www.ungleich.ch>
+#
# This file is part of GlusterFS.
#
# This file is licensed to you under your choice of the GNU Lesser
@@ -10,7 +12,7 @@
warn ()
{
- echo "$@" >/dev/stderr
+ echo "$@" >&2
}
_init ()
@@ -591,7 +593,7 @@ main ()
}
[ -z "$volume_id" -o -z "$server_ip" ] && {
- cat <<EOF >/dev/stderr
+ cat <<EOF >&2
ERROR: Server name/volume name unspecified cannot proceed further..
Please specify correct format
Usage:
@@ -602,7 +604,7 @@ EOF
grep_ret=$(echo ${mount_point} | grep '^\-o');
[ "x" != "x${grep_ret}" ] && {
- cat <<EOF >/dev/stderr
+ cat <<EOF >&2
ERROR: -o options cannot be specified in either first two arguments..
Please specify correct style
Usage:
@@ -614,7 +616,7 @@ EOF
# No need to do a ! -d test, it is taken care while initializing the
# variable mount_point
[ -z "$mount_point" -o ! -d "$mount_point" ] && {
- cat <<EOF >/dev/stderr
+ cat <<EOF >&2
ERROR: Mount point does not exist
Please specify a mount point
Usage:
diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in
index dc326b4528f..50a301c26a8 100755
--- a/xlators/mount/fuse/utils/mount_glusterfs.in
+++ b/xlators/mount/fuse/utils/mount_glusterfs.in
@@ -1,5 +1,6 @@
#!/bin/sh
# (C) 2014 Red Hat Inc. <http://www.redhat.com>
+# (C) 2015 ungleich GmbH <http://www.ungleich.ch>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -19,7 +20,7 @@
warn ()
{
- echo "$@" >/dev/stderr
+ echo "$@" >&2
}
_init ()
@@ -301,7 +302,7 @@ start_glusterfs ()
print_usage ()
{
-cat << EOF >/dev/stderr
+cat << EOF >&2
Usage: $0 <volumeserver>:<volumeid/volumeport> -o<options> <mountpoint>
Options:
man 8 $0
@@ -502,7 +503,7 @@ main ()
}
[ -z "$volume_id" -o -z "$server_ip" ] && {
- cat <<EOF >/dev/stderr
+ cat <<EOF >&2
ERROR: Server name/volume name unspecified cannot proceed further..
Please specify correct format
Usage:
@@ -513,7 +514,7 @@ EOF
grep_ret=$(echo ${mount_point} | grep '^\-o');
[ "x" != "x${grep_ret}" ] && {
- cat <<EOF >/dev/stderr
+ cat <<EOF >&2
ERROR: -o options cannot be specified in either first two arguments..
Please specify correct style
Usage:
@@ -525,7 +526,7 @@ EOF
# No need to do a ! -d test, it is taken care while initializing the
# variable mount_point
[ -z "$mount_point" -o ! -d "$mount_point" ] && {
- cat <<EOF >/dev/stderr
+ cat <<EOF >&2
ERROR: Mount point does not exist
Please specify a mount point
Usage: