From f545630888d52231a225b8cf0e1b31a7d1f6af01 Mon Sep 17 00:00:00 2001 From: Jiaying Ren Date: Thu, 17 Aug 2017 12:11:32 +0800 Subject: [PATCH] vstart.sh: quote cmd params when display executing cmd vstart.sh will echo executed cmd to the stdout: /root/jiaying/ceph/build/bin/radosgw -c /root/jiaying/ceph/build/ceph.conf --log-file=/root/jiaying/ceph/build/out/rgw.j.log --debug-ms=1 -n client.rgw --rgw_frontends=civetweb port=8000 As params contain whitespaces, pasting the above cmd into the shell didn't start rgw on the port 8000. Now the vstart.sh output is like the following: '/root/jiaying/ceph/build/bin/radosgw' '-c' '/root/jiaying/ceph/build/ceph.conf' '--log-file=/root/jiaying/ceph/build/out/rgw.j.log' '--debug-ms=1' '-n' 'client.rgw' '--rgw_frontends=civetweb port=8000' We can paste above cmd to the shell to restart rgw, it's more convenient for debugging. Signed-off-by: Jiaying Ren --- src/vstart.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vstart.sh b/src/vstart.sh index 82ec76bf94e..8d4d8ef369f 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -360,12 +360,12 @@ fi ARGS="-c $conf_fn" prunb() { - echo "$* &" + printf "'%s' " "$@"; echo '&' "$@" & } prun() { - echo "$*" + printf "'%s' " "$@"; echo "$@" } -- 2.39.5