From: Radosław Zarzyński Date: Fri, 8 Sep 2023 11:50:01 +0000 (+0200) Subject: ceph-run: fix string comparison around --no-restart X-Git-Tag: v19.3.0~370^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e80d11b3903c52d1a35112b822b7680b6d018ee3;p=ceph.git ceph-run: fix string comparison around --no-restart `man test` says the stirng equality operator is `=`: ``` STRING1 = STRING2 the strings are equal ``` Also, we should handle the argument-less case which currently fails: ``` $ [ $1 == "--no-restart" ] bash: [: ==: unary operator expected ``` Signed-off-by: Radosław Zarzyński --- diff --git a/src/ceph-run b/src/ceph-run index 764101c564f8..c28244d90f83 100755 --- a/src/ceph-run +++ b/src/ceph-run @@ -3,7 +3,7 @@ sleep=5 no_restart=0 -if [ $1 == "--no-restart" ]; then +if [ "$1" = "--no-restart" ]; then no_restart=1 shift fi