aboutsummaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'trunk')
-rwxr-xr-xtrunk/src/mkjail9
1 files changed, 3 insertions, 6 deletions
diff --git a/trunk/src/mkjail b/trunk/src/mkjail
index a40ff0d..a79bfe6 100755
--- a/trunk/src/mkjail
+++ b/trunk/src/mkjail
@@ -97,12 +97,9 @@ function jailist_update {
# update the jail list file
# usage: jailist_update <jail-path>
- if [ -s "$JAIL_LIST" ]; then
- if ! grep -q -e "^$1$" $JAIL_LIST; then
- echo $1 >> $JAIL_LIST
- fi
- else
- echo $1 > $JAIL_LIST
+ touch $JAIL_LIST
+ if ! grep -q -e "^$1\$" $JAIL_LIST; then
+ echo $1 >> $JAIL_LIST
fi
}