summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2006-02-15 14:36:55 +0000
committererdgeist <erdgeist@erdgeist.org>2006-02-15 14:36:55 +0000
commita2b29799af194531f8c90145be2f44d002d425c4 (patch)
treea873253d055c8b7423ef87b0d2e52bb751e47d8f
parent6d23ac4d1269337ae0368cce556217113146d426 (diff)
Dont install a jail to an existing location
-rwxr-xr-xezjail-admin4
1 files changed, 4 insertions, 0 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 9423d9c..b2f56e8 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -79,6 +79,10 @@ create)
79 # inside our jail directory 79 # inside our jail directory
80 [ ${newjail_root%%[!/]*} ] || newjail_root=${ezjail_jaildir}/${newjail_root} 80 [ ${newjail_root%%[!/]*} ] || newjail_root=${ezjail_jaildir}/${newjail_root}
81 81
82 # if a directory at the specified jail root already exists, refuse to
83 # install
84 [ -e ${newjail_root} ] && exerr "Error: the specified jail root ${newjail_root} alread exists."
85
82 # if jail root specified on command line does not lie within our jail 86 # if jail root specified on command line does not lie within our jail
83 # directory, we need to create a softlink 87 # directory, we need to create a softlink
84 if [ "${newjail_root##${ezjail_jaildir}}" = "${newjail_root}" ]; then 88 if [ "${newjail_root##${ezjail_jaildir}}" = "${newjail_root}" ]; then