]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
backupninja: updated rub handler and upgraded to 0.9.4
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Tue, 31 Oct 2006 01:27:27 +0000 (01:27 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Tue, 31 Oct 2006 01:27:27 +0000 (01:27 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@550 370017ae-e619-0410-ac65-c121f96126d4

backupninja/backupninja.SlackBuild
backupninja/rub

index 5625a2c45e6107804b6d73ad543ba92595bc05ad..6e06ec1ea3b0dc7f3581abce2209facb0e9080ae 100755 (executable)
@@ -17,7 +17,7 @@ fi
 # default settings
 PACKAGE="backupninja"
 ARCH="noarch"
-VERSION=${VERSION:=0.9.3}
+VERSION=${VERSION:=0.9.4}
 BUILD=${BUILD:=5rha}
 SRC_DIR=${SRC:=$CWD}
 TMP=${TMP:=/tmp}
index d2b4c4460a8718c106e2014e931f3e57281adea4..cdbc9e058c39baf57f27e8a108ec80c96c5a9671 100644 (file)
@@ -100,31 +100,29 @@ getconf service
 
 function rotate {
 
-  # TODO: force to an absolute path
-
   if [[ "$2" < 4 ]]; then
     error "Rotate: minimum of 4 rotations"
     exit 1
   fi
 
   if [ -d $1.$2 ]; then
-    $nice $mv $1.$2 $1.tmp
+    $nice $mv /$1.$2 /$1.tmp
   fi
 
   for ((n=`echo "$2 - 1" | bc`; n >= 0; n--)); do
     if [ -d $1.$n ]; then
       dest=`echo "$n + 1" | bc`
-      $nice $mv $1.$n $1.$dest
-      $touch $1.$dest
+      $nice $mv /$1.$n /$1.$dest
+      $touch /$1.$dest
     fi
   done
 
   if [ -d $1.tmp ]; then
-    $nice $mv $1.tmp $1.0
+    $nice $mv /$1.tmp /$1.0
   fi
 
   if [ -d $1.1 ]; then
-    $nice $cp -alf $1.1/. $1.0
+    $nice $cp -alf /$1.1/. /$1.0
   fi
 
 }
@@ -257,18 +255,17 @@ if [ "$vservers_are_available" == "yes" ]; then
   mkdir -p $backupdir/$VROOTDIR
   chmod 000 $backupdir/$VROOTDIR
 
-  for candidate in `ls $VROOTDIR`; do
+  for candidate in $found_vservers; do
+    candidate="`basename $candidate`"
     found_excluded_vserver="0"
-    if [ "$candidate" != "lost+found" ]; then
-      for excluded_vserver in $exclude_vserver; do
-        if [ "$excluded_vserver" == "$candidate" ]; then
-          found_excluded_vserver="1"
-          break
-        fi
-      done
-      if [ "$found_excluded_vserver" == "0" ]; then
-        include="$include $VROOTDIR/$candidate"
+    for excluded_vserver in $exclude_vserver; do
+      if [ "$excluded_vserver" == "$candidate" ]; then
+        found_excluded_vserver="1"
+        break
       fi
+    done
+    if [ "$found_excluded_vserver" == "0" ]; then
+      include="$include $VROOTDIR/$candidate"
     fi
   done
 fi