From 3c26ebfd7b337db424e35f4a6e963727b3bfe8db Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 17 Nov 2005 12:36:49 +0000 Subject: exit called once too often --- ezjail-admin | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ezjail-admin b/ezjail-admin index cf2816e..25b64e3 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -71,12 +71,12 @@ create) # allow foo.com style directory names, however, the jail # name will be foo_com in most scripts newjail_name=`echo $newjail_name | tr /~ __`; - newjail_root=${newjail_root:-"$ezjail_jaildir/$newjail_name"} + newjail_root=${newjail_root:-"${ezjail_jaildir}/${newjail_name}"} newjail_nname=`echo $newjail_name | tr . _`; # if jail root specified on command line is not absolute, # make it absolute inside our jail directory - [ ${newjail_root#/} = ${newjail_root} ] || newjail_root=$ezjail_jaildir/$newjail_root + [ ${newjail_root#/} = ${newjail_root} ] && newjail_root=$ezjail_jaildir/$newjail_root # if jail root specified on command line does not lie # within our jail directory, we need to create a softlink @@ -140,7 +140,7 @@ delete) ######################## ezjail-admin DELETE ######################## shift args=`getopt w $*` - [ $? = 0 ] || exerr 'Usage: ezjail delete [-w] jailname'; exit 1; + [ $? = 0 ] || exerr 'Usage: ezjail delete [-w] jailname'; oldjail_wipe="NO" @@ -253,6 +253,6 @@ setup|update) ;; *) - echo "Usage: `basename $0` [create|delete|list|update] {params}"; exit; + exerr "Usage: `basename $0` [create|delete|list|update] {params}" ;; esac -- cgit v1.2.3