]> git.sesse.net Git - backup.sh/commitdiff
Fix behavior with newer tail.
authorroot <empty>
Mon, 16 Jul 2012 11:12:44 +0000 (11:12 +0000)
committerroot <empty>
Mon, 16 Jul 2012 11:12:44 +0000 (11:12 +0000)
backup-nonpriv.sh

index d2bb8f3a02b96042438c3f7a16b575548580baf3..3ed901fe10dd2c65115a97806cd468fdfb71c38e 100755 (executable)
@@ -192,7 +192,7 @@ do
   #delete complete backups
   mf=$(($localmaksantallfulle+1))
 
-  for full in `ls -1t $storagedir/$computer/$sfilesystem/full/*tgz.gpg | tail +$mf`
+  for full in `ls -1t $storagedir/$computer/$sfilesystem/full/*tgz.gpg | tail -n +$mf`
   do
    prefix=`echo $full | sed "s/\.[^.]*$//"`
    echo "$computer:$filesystem sletter full $prefix (for mange)"
@@ -200,7 +200,7 @@ do
   done
 
   #delete incremental backups older than the oldest complete backup
-  oldf=`ls -t1 $storagedir/$computer/$sfilesystem/full/*tgz.gpg | tail -1`
+  oldf=`ls -t1 $storagedir/$computer/$sfilesystem/full/*tgz.gpg | tail -1`
   find \
      $storagedir/$computer/$sfilesystem/daglig \
      -type f \