summaryrefslogtreecommitdiff
path: root/src/ceph_common.sh
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-12 14:20:02 -0800
committerSage Weil <sage@newdream.net>2010-02-12 14:20:02 -0800
commit72d71177718fd0943231088dc260dcf2138b030f (patch)
treea56b30994b974ec6a6358da2ce37ebf649df965e /src/ceph_common.sh
parent10ae652f0325a19e435685704f90d0b3327abcc6 (diff)
downloadceph-72d71177718fd0943231088dc260dcf2138b030f.tar.gz
init-ceph: print 'already started' instead of failing to start
Diffstat (limited to 'src/ceph_common.sh')
-rw-r--r--src/ceph_common.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ceph_common.sh b/src/ceph_common.sh
index 359d25a6e14..32fc232fe4c 100644
--- a/src/ceph_common.sh
+++ b/src/ceph_common.sh
@@ -65,13 +65,13 @@ do_cmd() {
ulimit -c unlimited
whoami=`whoami`
if [ "$whoami" = "$user" ] || [ -z "$user" ]; then
- bash -c "$1" || { echo "failed: '$1'" ; exit 1; }
+ bash -c "$1" || { [ -z "$3" ] && echo "failed: '$1'" && exit 1; }
else
- sudo su $user -c "$1" || { echo "failed: '$1'" ; exit 1; }
+ sudo su $user -c "$1" || { [ -z "$3" ] && echo "failed: '$1'" && exit 1; }
fi
else
[ $verbose -eq 1 ] && echo "--- $ssh $2 \"cd $dir ; ulimit -c unlimited ; $1\""
- $ssh $2 "cd $dir ; ulimit -c unlimited ; $1" || { echo "failed: '$ssh $1'" ; exit 1; }
+ $ssh $2 "cd $dir ; ulimit -c unlimited ; $1" || { [ -z "$3" ] && echo "failed: '$ssh $1'" && exit 1; }
fi
}