From 9d773c02981d74ff37eeb51c24f1240c689d1e96 Mon Sep 17 00:00:00 2001 From: ramon Date: Fri, 13 Oct 2017 11:00:17 +0000 Subject: #810: Indicar si existen backups de imágenes en ruta RREST {{{/repository/images}}}. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/branches/version1.1@5460 a21b9725-9963-47de-94b9-378ad31fedc9 --- repoman/bin/checkrepo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'repoman/bin') diff --git a/repoman/bin/checkrepo b/repoman/bin/checkrepo index 40643931..822ae20a 100755 --- a/repoman/bin/checkrepo +++ b/repoman/bin/checkrepo @@ -153,6 +153,7 @@ function checkfiles() { # Retrieve image creation data and delete temporary file. INFO="$IMG.info" [ -e "$INFO" -a "$INFO" -ot "$IMG" ] && rm -f "$INFO" && echo "Warning: Deleted outdated file $INFO" + DATA="" [ -r "$INFO" ] && DATA=$(cat "$INFO") # Add data to configuration file (name, type and data) and remove image info file. IMG=${IMG#$IMAGESDIR/} @@ -170,7 +171,7 @@ function checkdirs() { IMG="$(dirname "${INFO#$IMAGESDIR/}")" # Skip repository root directory and locked images. [ "$IMG" == "$IMAGESDIR" -o -e "$IMG.lock" ] && continue - DATA=$(awk -F= '$1=="# fstype" {fs=$2} $1=="# sizedata" {sz=$2} END {printf "::%s:%s:",fs,sz}' "$INFO") + DATA=$(awk -F= '$1=="# fstype" {fs=$2} $1=="# sizedata" {sz=$2} END {printf "rsync::%s:%s:",fs,sz}' "$INFO") # Add data to configuration file (name, type and data). addToJson "$IMG" "dir" "$DATA" done -- cgit v1.2.3-18-g5258