]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
small fix
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 9 Feb 2007 16:50:07 +0000 (16:50 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 9 Feb 2007 16:50:07 +0000 (16:50 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@166 04377dda-e619-0410-9926-eae83683ac58

src/mkjail

index 0b6adb3840302cdb30651a38e8639026b46bdd09..3be3efbbd72bcd64a5eb9cbe7e4fbfa3611cbf15 100755 (executable)
@@ -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
 
 }