From 2489b537575e976bdc4e1c4c80d844817866d855 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 25 Sep 2005 12:52:04 +0000 Subject: delete works now, stupid nname bug fixed --- ezjail-admin | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ezjail-admin') diff --git a/ezjail-admin b/ezjail-admin index f1db4dd..b808faa 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -67,7 +67,7 @@ create) # name will be foo_com in most scripts newjail_name=`echo $newjail_name | tr /~ __`; newjail_root=${newjail_root:-"$ezjail_jaildir/$newjail_name"} - newjail_nname=`echo $newjail_nname | tr . _`; + newjail_nname=`echo $newjail_name | tr . _`; # if jail root specified on command line is not absolute, # make it absolute inside our jail directory @@ -149,24 +149,24 @@ delete) # fetch information about the jail to be gone # by parsing our records . ${ezjail_jailcfgs}/${oldjail_nname} - eval oldjail_root=\"\$jail_${oldjail_nname}_root\" + eval oldjail_rootdir=\"\$jail_${oldjail_nname}_rootdir\" # now we know everything we need to let the jail be gone # remove entry from ezjail resource structure - echo rm -f ${ezjail_jailcfgs}/${oldjail_nname} + rm -f ${ezjail_jailcfgs}/${oldjail_nname} # delete fstab.JAILNAME - echo rm -f /etc/fstab.$oldjail_nname + rm -f /etc/fstab.$oldjail_nname # if there is a soft link pointing to the jail root, remove it - oldjail_softlink=$ezjail_jaildir/`basename $oldjail_root` + oldjail_softlink=$ezjail_jaildir/`basename $oldjail_rootdir` if [ -L $oldjail_softlink ]; then - echo rm $oldjail_softlink + rm $oldjail_softlink fi # if wiping the jail was requested, remove it if [ $oldjail_wipe = "YES" ]; then - echo rm -rf $oldjail_root + rm -rf $oldjail_rootdir fi ;; -- cgit v1.2.3