]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crun will not run infintely if -d specified on the command line
authorYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 3 Oct 2008 19:33:26 +0000 (12:33 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 3 Oct 2008 19:33:26 +0000 (12:33 -0700)
src/crun

index a07be29d67e9730a918d1a68fb1ddd3c38b229ec..c5e35b4bad1b6d4b69a82c3ff996e12f7927fedd 100755 (executable)
--- 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