mirror of
https://github.com/ceph/ceph
synced 2025-03-02 06:21:38 +00:00
initscripts: make do_cmd properly bail when command fails
And print what command it was that failed.
This commit is contained in:
parent
565dae5e4d
commit
4160adcbfa
@ -45,9 +45,9 @@ do_cmd() {
|
||||
[ $verbose -eq 1 ] && echo "--- $host:$dir# $1"
|
||||
if [ -z "$ssh" ]; then
|
||||
ulimit -c unlimited
|
||||
bash -c "$1" || (echo failed. ; exit 1)
|
||||
bash -c "$1" || { echo "failed: '$1'" ; exit 1; }
|
||||
else
|
||||
$ssh "cd $dir ; ulimit -c unlimited ; $1" || (echo failed. ; exit 1)
|
||||
$ssh "cd $dir ; ulimit -c unlimited ; $1" || { echo "failed: '$ssh $1'" ; exit 1; }
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user