From c640f50004233c0ca72551d4ca1b18ba356ee340 Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Thu, 18 Oct 2007 12:54:02 +0000 Subject: [PATCH] Prepare for displaying status of different clones. * lysrdiff-status: Use $CLONE instead of hardcoding "perm" when selecting which clone to display status for. The CLONE variable is still a hardcoded constant. :-) --- ChangeLog | 5 +++++ lysrdiff-status | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7114a1..d6dbda6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-10-18 Per Cederqvist <ceder@shafan.lysator.liu.se> + Prepare for displaying status of different clones. + * lysrdiff-status: Use $CLONE instead of hardcoding "perm" when + selecting which clone to display status for. The CLONE variable + is still a hardcoded constant. :-) + Make backup-one-task more robust against hung servers. * backup-one-task: Use BatchMode and ServerAliveInterval when fetching the exclude file, to avoid hangs. diff --git a/lysrdiff-status b/lysrdiff-status index 10dc3eb..77fdb4f 100755 --- a/lysrdiff-status +++ b/lysrdiff-status @@ -1,14 +1,17 @@ #!/bin/sh -df -hl /lysrdiff/*/perm/*/lysrdiff +CLONE=perm +#CLONE=B + +df -hl /lysrdiff/*/$CLONE/*/lysrdiff echo statecache=/tmp/cached-state-$USER -for base in /lysrdiff/*/perm/*/lysrdiff +for base in /lysrdiff/*/$CLONE/*/lysrdiff do - disk=`echo $base|sed 's%/lysrdiff/\([0-9]*\)/perm/\([0-9]*\)/lysrdiff%\1%'` - part=`echo $base|sed 's%/lysrdiff/\([0-9]*\)/perm/\([0-9]*\)/lysrdiff%\2%'` + disk=`echo $base|sed 's%/lysrdiff/\([0-9]*\)/'$CLONE'/\([0-9]*\)/lysrdiff%\1%'` + part=`echo $base|sed 's%/lysrdiff/\([0-9]*\)/'$CLONE'/\([0-9]*\)/lysrdiff%\2%'` # GNU findutils 4.3.3 and newer includes subsecond output in the %TS # format. The sed statement truncates the seconds. find $base/state -type f \ -- GitLab