]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
jailist_update changes
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 11 Feb 2007 19:46:15 +0000 (19:46 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 11 Feb 2007 19:46:15 +0000 (19:46 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@183 04377dda-e619-0410-9926-eae83683ac58

trunk/src/mkjail

index a40ff0d9fa5a5d10493c76bec9bb30b472d217b8..a79bfe694172f8ef9654112313e0f8e007a49839 100755 (executable)
@@ -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
 
 }