From 93e6eb8e52be68830815017f504a8bbfd76187e5 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 16 Mar 2012 11:01:27 +0000 Subject: [PATCH] bin/run-mirrors: If we have a keytab file, log in with it. This stops the mirror job hanging if the filestore is mounted over Kerberized NFS. --- .gitignore | 1 + bin/run-mirrors | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 0e932c7..69e47ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ log var +etc/krb4.keytab diff --git a/bin/run-mirrors b/bin/run-mirrors index c69b903..9d637b8 100755 --- a/bin/run-mirrors +++ b/bin/run-mirrors @@ -19,6 +19,11 @@ case "${MIRROR_LOCKED-nil}" in nil) exec env MIRROR_LOCKED=t locking -f var/mirror.lock "$0" "$@" ;; esac +## Hack for mad Kerberized NFS. +if [ -r etc/krb5.keytab ]; then + kinit -k -t etc/krb5.keytab mirror +fi + ## Before we start, rotate the logs. (Doing things this way means that we ## can be sure we don't lose new logs, even if the log rotation goes ## completely mental. -- 2.11.0