From ab5845e7b5c754805ac98f69b2bce2d18ed07881 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 3 Oct 2008 12:33:26 -0700 Subject: [PATCH] crun will not run infintely if -d specified on the command line --- src/crun | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/crun b/src/crun index a07be29d67e97..c5e35b4bad1b6 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 -- 2.39.5