Use k5start even for the readonly reprepro actions

Now that the db files are in AFS, we need k5start because we need to be
able to write lockfiles for them.

Change-Id: I5c9554ca505ed56e84b601e40476527ef4af98fb
This commit is contained in:
Monty Taylor 2016-02-08 10:35:53 -06:00
parent 918c185761
commit 8e7c013953

View File

@ -17,14 +17,14 @@
set -e
UNREF_FILE=/var/run/reprepro/unreferenced-files
REPREPRO='reprepro --confdir /etc/reprepro'
REPREPRO='k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 30m reprepro --confdir /etc/reprepro'
echo "Obtaining reprepro tokens and running reprepro update"
k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 30m $REPREPRO update
$REPREPRO update
if [ -f $UNREF_FILE ] ; then
echo "Cleaning up files made unreferenced on the last run"
k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 30m $REPREPRO deleteifunreferenced < $UNREF_FILE
$REPREPRO deleteifunreferenced < $UNREF_FILE
fi
echo "Saving list of newly unreferenced files for next time"