From: Yehuda Sadeh Date: Fri, 3 Oct 2008 19:33:26 +0000 (-0700) Subject: crun will not run infintely if -d specified on the command line X-Git-Tag: v0.4~36 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ab5845e7b5c754805ac98f69b2bce2d18ed07881;p=ceph.git crun will not run infintely if -d specified on the command line --- diff --git a/src/crun b/src/crun index a07be29d67e9..c5e35b4bad1b 100755 --- a/src/crun +++ b/src/crun @@ -1,5 +1,18 @@ #!/bin/sh +let daemon=0 +orig_args=$* + +while [ $# -ge 1 ]; do + case $1 in + -d | --daemon ) + daemon=1 + esac + shift +done + + while [ true ]; do - $* + $orig_args + [ $daemon -eq 1 ] && exit done