aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-09 16:50:07 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-09 16:50:07 +0000
commit754cad3cb19570e534300e04494b230f1d4f5400 (patch)
tree0839a92f8b8538c6eae440580f94e868e31fde01 /src
parentb509528373b4580e951202120ca047da789dca81 (diff)
downloadsimplepkg-754cad3cb19570e534300e04494b230f1d4f5400.tar.gz
simplepkg-754cad3cb19570e534300e04494b230f1d4f5400.tar.bz2
small fix
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@166 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src')
-rwxr-xr-xsrc/mkjail8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mkjail b/src/mkjail
index 0b6adb3..3be3efb 100755
--- a/src/mkjail
+++ b/src/mkjail
@@ -97,8 +97,12 @@ function jailist_update {
# update the jail list file
# usage: jailist_update <jail-path>
- if ! grep -q "^$1" $JAIL_LIST; then
- echo $1 >> $JAIL_LIST
+ if [ -f "$JAIL_LIST" ]; then
+ if ! grep -q "^$1" $JAIL_LIST; then
+ echo $1 >> $JAIL_LIST
+ fi
+ else
+ echo $1 > $JAIL_LIST
fi
}