summaryrefslogtreecommitdiff
path: root/ezjail-admin
diff options
context:
space:
mode:
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-xezjail-admin13
1 files changed, 6 insertions, 7 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 93a9e1f..649fde1 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -58,7 +58,7 @@ create)
58 fi 58 fi
59 59
60 # relative paths don't make sense in rc.scripts 60 # relative paths don't make sense in rc.scripts
61 if [ "${ezjail_jaildir:0:1}" != "/" ]; then 61 if [ "${ezjail_jaildir#/}" == "${ezjail_jaildir}" ]; then
62 echo Error: Need an absolute path in ezjail_jaildir, it is currently set to: $ezjail_jaildir 62 echo Error: Need an absolute path in ezjail_jaildir, it is currently set to: $ezjail_jaildir
63 exit 1; 63 exit 1;
64 fi 64 fi
@@ -73,7 +73,7 @@ create)
73 73
74 # if jail root specified on command line is not absolute, 74 # if jail root specified on command line is not absolute,
75 # make it absolute inside our jail directory 75 # make it absolute inside our jail directory
76 if [ ${newjail_root:1:1} != / ]; then 76 if [ "${newjail_root#/}" = "${newjail_root}" ]; then
77 newjail_root=$ezjail_jaildir/$newjail_root 77 newjail_root=$ezjail_jaildir/$newjail_root
78 fi 78 fi
79 79
@@ -81,10 +81,9 @@ create)
81 # within our jail directory, we need to create a softlink 81 # within our jail directory, we need to create a softlink
82 if [ ${newjail_root##${ezjail_jaildir}} = $newjail_root ]; then 82 if [ ${newjail_root##${ezjail_jaildir}} = $newjail_root ]; then
83 newjail_softlink=$ezjail_jaildir/`basename $newjail_root` 83 newjail_softlink=$ezjail_jaildir/`basename $newjail_root`
84 if [ -e $newjail_softlink -a $newjail_fill = "YES" ]; then 84 if [ -e $newjail_softlink -a $newjail_fill = "YES" ]; then
85 echo Error: an ezjail already exists at $newjail_softlink 85 echo Error: an ezjail already exists at $newjail_softlink
86 exit 1; 86 exit 1;
87 fi
88 fi 87 fi
89 fi 88 fi
90 89
@@ -148,7 +147,7 @@ update)
148 fi 147 fi
149 148
150 cd ${ezjail_sourcetree} 149 cd ${ezjail_sourcetree}
151 rm -r ${ezjail_jailfull}; mkdir -p ${ezjail_jailfull} 150 rm -rf ${ezjail_jailfull}; mkdir -p ${ezjail_jailfull}
152 make ${updatejail_installaction} DESTDIR=${ezjail_jailfull} 151 make ${updatejail_installaction} DESTDIR=${ezjail_jailfull}
153 make distribution DESTDIR=${ezjail_jailfull} 152 make distribution DESTDIR=${ezjail_jailfull}
154 153