From: Jiaying Ren Date: Thu, 17 Aug 2017 04:11:32 +0000 (+0800) Subject: vstart.sh: quote cmd params when display executing cmd X-Git-Tag: v13.0.1~1123^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F17057%2Fhead;p=ceph.git 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 --- diff --git a/src/vstart.sh b/src/vstart.sh index 82ec76bf94ee..8d4d8ef369f2 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 "$@" }