From ec07b599f8e563a530ceb30e80f035de20ac8f3b Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Tue, 3 Apr 2007 06:08:06 +0000 Subject: [PATCH] Install the programs and files using a more sane prefix. * Makefile (BINDIR): Changed to /opt/LYSrdiff. * backup-all: Changed prefix to /opt/LYSrdiff. * backup-one-task: Ditto. * backup-repeatedly: Ditto. * distribute-tasks: Ditto. * fetch-backup-work: Ditto. * lysrdiff-move-job: Ditto. --- ChangeLog | 11 +++++++++++ Makefile | 2 +- backup-all | 10 +++++----- backup-one-task | 2 +- backup-repeatedly | 22 +++++++++++----------- distribute-tasks | 4 ++-- fetch-backup-work | 2 +- lysrdiff-move-job | 2 +- 8 files changed, 33 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab12821..2719741 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-04-03 Per Cederqvist <ceder@shafan.lysator.liu.se> + + Install the programs and files using a more sane prefix. + * Makefile (BINDIR): Changed to /opt/LYSrdiff. + * backup-all: Changed prefix to /opt/LYSrdiff. + * backup-one-task: Ditto. + * backup-repeatedly: Ditto. + * distribute-tasks: Ditto. + * fetch-backup-work: Ditto. + * lysrdiff-move-job: Ditto. + 2007-04-03 Per Cederqvist <ceder@sedesopim.lysator.liu.se> LYSrdiff partitions are now named after both the disk and the diff --git a/Makefile b/Makefile index eddadbb..7074fb0 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BINDIR=/nobackup/backup.lysator/bin +BINDIR=/opt/LYSrdiff/bin all:; diff --git a/backup-all b/backup-all index 32d04cc..4057a81 100755 --- a/backup-all +++ b/backup-all @@ -66,7 +66,7 @@ do fi done -/nobackup/backup.lysator/bin/distribute-tasks $PARTS +/opt/LYSrdiff/bin/distribute-tasks $PARTS total=0 for lysrdiffpart in $PARTS @@ -84,23 +84,23 @@ do while read category subcategory server serverpath do - if [ -f /nobackup/backup.lysator/etc/stop ] + if [ -f /opt/LYSrdiff/etc/stop ] then echo Stop file found. Exiting at $ctr/$total. >&2 exit 1 fi - if [ -f /nobackup/backup.lysator/etc/hold ] + if [ -f /opt/LYSrdiff/etc/hold ] then echo Hold file found. Holding at $ctr/$total... >&2 - while [ -f /nobackup/backup.lysator/etc/hold ] + while [ -f /opt/LYSrdiff/etc/hold ] do sleep 1 done echo Hold file disappeared. Continuing. >&2 fi - /nobackup/backup.lysator/bin/backup-one-task \ + /opt/LYSrdiff/bin/backup-one-task \ $failed $retry $new $only_prune \ $disk $part "$category" "$subcategory" "$server" "$serverpath" \ "$ctr/$total $disk/$part $category $subcategory" diff --git a/backup-one-task b/backup-one-task index 8e6f9ad..62e9062 100755 --- a/backup-one-task +++ b/backup-one-task @@ -17,7 +17,7 @@ retry=0 new=0 only_prune=0 -ss=/nobackup/backup.lysator/bin/lysrdiff-set-status.py +ss=/opt/LYSrdiff/bin/lysrdiff-set-status.py while [ $# -gt 1 ] do diff --git a/backup-repeatedly b/backup-repeatedly index ff34a7b..2f2bb1f 100755 --- a/backup-repeatedly +++ b/backup-repeatedly @@ -3,33 +3,33 @@ ctr=0 while : do ctr=`expr $ctr + 1` - [ -f /nobackup/backup.lysator/etc/finish ] && break - [ -f /nobackup/backup.lysator/etc/stop ] && break + [ -f /opt/LYSrdiff/etc/finish ] && break + [ -f /opt/LYSrdiff/etc/stop ] && break echo echo Running all jobs. Repeat count: $ctr. echo - /nobackup/backup.lysator/bin/backup-all $@ + /opt/LYSrdiff/bin/backup-all $@ - [ -f /nobackup/backup.lysator/etc/finish ] && break - [ -f /nobackup/backup.lysator/etc/stop ] && break + [ -f /opt/LYSrdiff/etc/finish ] && break + [ -f /opt/LYSrdiff/etc/stop ] && break echo echo Retrying failed jobs. Repeat count: $ctr. echo - /nobackup/backup.lysator/bin/backup-all --failed $@ + /opt/LYSrdiff/bin/backup-all --failed $@ - [ -f /nobackup/backup.lysator/etc/finish ] && break - [ -f /nobackup/backup.lysator/etc/stop ] && break + [ -f /opt/LYSrdiff/etc/finish ] && break + [ -f /opt/LYSrdiff/etc/stop ] && break echo echo Retrying jobs with warnings. Repeat count: $ctr. echo # This takes too much time... - # /nobackup/backup.lysator/bin/backup-all --retry $@ + # /opt/LYSrdiff/bin/backup-all --retry $@ - [ -f /nobackup/backup.lysator/etc/finish ] && break - [ -f /nobackup/backup.lysator/etc/stop ] && break + [ -f /opt/LYSrdiff/etc/finish ] && break + [ -f /opt/LYSrdiff/etc/stop ] && break echo echo Sleeping one minute. Repeat count: $ctr. diff --git a/distribute-tasks b/distribute-tasks index 10badd2..ffc8727 100755 --- a/distribute-tasks +++ b/distribute-tasks @@ -62,7 +62,7 @@ class JobInfo(object): self.host(), self.directory()) def newtasks(): - where = open("/nobackup/backup.lysator/var/newtasks").read() + where = open("/opt/LYSrdiff/var/newtasks").read() disk, part = where.split("/") return (int(disk), int(part)) @@ -109,7 +109,7 @@ def read_new_tasks(): new_found = False new_tasks = [] - for line in file("/nobackup/backup.lysator/var/tasks"): + for line in file("/opt/LYSrdiff/var/tasks"): info = parse_line(line) if info.source() not in tasks_per_source: for other in tasks_per_destination.get(info.destination(), []): diff --git a/fetch-backup-work b/fetch-backup-work index f515bc5..59123e8 100755 --- a/fetch-backup-work +++ b/fetch-backup-work @@ -1,6 +1,6 @@ #!/bin/sh -TASKS=/nobackup/backup.lysator/var/tasks +TASKS=/opt/LYSrdiff/var/tasks NT=$TASKS.tmp rm -f $NT diff --git a/lysrdiff-move-job b/lysrdiff-move-job index 9b3c2f5..44d6731 100755 --- a/lysrdiff-move-job +++ b/lysrdiff-move-job @@ -57,7 +57,7 @@ done rm $MOVEDTASK echo "Moving $category $subcategory" -ss=/nobackup/backup.lysator/bin/lysrdiff-set-status.py +ss=/opt/LYSrdiff/bin/lysrdiff-set-status.py $ss $srcdisk $srcpart "Moving $category $subcategory to $dstdisk $dstpart" $ss $dstdisk $dstpart "Moving $category $subcategory from $srcdisk $srcpart" -- GitLab