From a4ffb330d2957438e5b5590d31b6cdfb0d96420d Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 29 Mar 2018 14:55:28 +1100 Subject: [PATCH] Enable shared volumes in reprepro-mirror-update If two reprepro mirrors share the same volume (as in mariadb) they end up possibly using the same $UNREF_FILE, which gets things mighty confused. Add the config filename as a key into the unreferenced file list to differentiate. Change-Id: I9f0df9bcf651438fee600091f631543260e40a01 --- .../files/reprepro/reprepro-mirror-update.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh b/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh index dc61424419..31c3ee58ac 100644 --- a/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh +++ b/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh @@ -28,9 +28,10 @@ fi REPREPRO_CONFIG=$1 MIRROR_VOLUME=$2 -BASE=`cat ${REPREPRO_CONFIG}/options | grep base | cut -d' ' -f2` +BASE=$(cat ${REPREPRO_CONFIG}/options | grep base | cut -d' ' -f2) +CONFIG_KEY=$(basename $REPREPRO_CONFIG) -UNREF_FILE=/var/run/reprepro/${MIRROR_VOLUME}.unreferenced-files +UNREF_FILE=/var/run/reprepro/${MIRROR_VOLUME}.${CONFIG_KEY}.unreferenced-files K5START="k5start -t -f /etc/reprepro.keytab service/reprepro -- ${TIMEOUT} " REPREPRO="$K5START reprepro --confdir $REPREPRO_CONFIG"