diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-10-31 01:27:27 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-10-31 01:27:27 +0000 |
commit | 84b447a371bef2e6ada9f0f6feaef37bf59e873a (patch) | |
tree | c6f605c23b83d426e21f91bc77179f86d34c1ff9 /backupninja/rub | |
parent | 92a3f3857e36f8005182d217a05f6f670f31cf82 (diff) | |
download | slackbuilds-84b447a371bef2e6ada9f0f6feaef37bf59e873a.tar.gz slackbuilds-84b447a371bef2e6ada9f0f6feaef37bf59e873a.tar.bz2 |
backupninja: updated rub handler and upgraded to 0.9.4
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@550 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'backupninja/rub')
-rw-r--r-- | backupninja/rub | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/backupninja/rub b/backupninja/rub index d2b4c446..cdbc9e05 100644 --- a/backupninja/rub +++ b/backupninja/rub @@ -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 |