diff options
author | erdgeist <erdgeist@erdgeist.org> | 2005-09-25 12:52:04 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2005-09-25 12:52:04 +0000 |
commit | 2489b537575e976bdc4e1c4c80d844817866d855 (patch) | |
tree | 519090fdef3fa427d4b70e4370ec5d93c943f1d0 /ezjail-admin | |
parent | 2fcd7f1a76faa37b6cf8827dfee9875f041c8dd9 (diff) |
delete works now, stupid nname bug fixed
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-x | ezjail-admin | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ezjail-admin b/ezjail-admin index f1db4dd..b808faa 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
@@ -67,7 +67,7 @@ create) | |||
67 | # name will be foo_com in most scripts | 67 | # name will be foo_com in most scripts |
68 | newjail_name=`echo $newjail_name | tr /~ __`; | 68 | newjail_name=`echo $newjail_name | tr /~ __`; |
69 | newjail_root=${newjail_root:-"$ezjail_jaildir/$newjail_name"} | 69 | newjail_root=${newjail_root:-"$ezjail_jaildir/$newjail_name"} |
70 | newjail_nname=`echo $newjail_nname | tr . _`; | 70 | newjail_nname=`echo $newjail_name | tr . _`; |
71 | 71 | ||
72 | # if jail root specified on command line is not absolute, | 72 | # if jail root specified on command line is not absolute, |
73 | # make it absolute inside our jail directory | 73 | # make it absolute inside our jail directory |
@@ -149,24 +149,24 @@ delete) | |||
149 | # fetch information about the jail to be gone | 149 | # fetch information about the jail to be gone |
150 | # by parsing our records | 150 | # by parsing our records |
151 | . ${ezjail_jailcfgs}/${oldjail_nname} | 151 | . ${ezjail_jailcfgs}/${oldjail_nname} |
152 | eval oldjail_root=\"\$jail_${oldjail_nname}_root\" | 152 | eval oldjail_rootdir=\"\$jail_${oldjail_nname}_rootdir\" |
153 | 153 | ||
154 | # now we know everything we need to let the jail be gone | 154 | # now we know everything we need to let the jail be gone |
155 | # remove entry from ezjail resource structure | 155 | # remove entry from ezjail resource structure |
156 | echo rm -f ${ezjail_jailcfgs}/${oldjail_nname} | 156 | rm -f ${ezjail_jailcfgs}/${oldjail_nname} |
157 | 157 | ||
158 | # delete fstab.JAILNAME | 158 | # delete fstab.JAILNAME |
159 | echo rm -f /etc/fstab.$oldjail_nname | 159 | rm -f /etc/fstab.$oldjail_nname |
160 | 160 | ||
161 | # if there is a soft link pointing to the jail root, remove it | 161 | # if there is a soft link pointing to the jail root, remove it |
162 | oldjail_softlink=$ezjail_jaildir/`basename $oldjail_root` | 162 | oldjail_softlink=$ezjail_jaildir/`basename $oldjail_rootdir` |
163 | if [ -L $oldjail_softlink ]; then | 163 | if [ -L $oldjail_softlink ]; then |
164 | echo rm $oldjail_softlink | 164 | rm $oldjail_softlink |
165 | fi | 165 | fi |
166 | 166 | ||
167 | # if wiping the jail was requested, remove it | 167 | # if wiping the jail was requested, remove it |
168 | if [ $oldjail_wipe = "YES" ]; then | 168 | if [ $oldjail_wipe = "YES" ]; then |
169 | echo rm -rf $oldjail_root | 169 | rm -rf $oldjail_rootdir |
170 | fi | 170 | fi |
171 | 171 | ||
172 | ;; | 172 | ;; |