summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2005-09-21 14:24:52 +0000
committererdgeist <erdgeist@erdgeist.org>2005-09-21 14:24:52 +0000
commit2e8a290b5d0baf1d9cd73671710b107d7d311c94 (patch)
tree8e849b5b4e881d3ec63a2690d8e7a973a9c46c31
parent34706172d76e5a32c5c3fe5a03702c5700f1e422 (diff)
nonstandard expansions removed, syntax errors removed
-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