From b2bf79df344b544ee47401977ed5a9e39580f148 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 4 May 2010 14:27:36 -0700 Subject: [PATCH] Preserve AFS mount point and cache directory in cacheinfo * Preserve the AFS mount point and cache directorys set in /etc/openafs/cacheinfo if the file already exists rather than overwriting them with the defaults. Thanks, Liam Healy. (Closes: #580077) --- debian/changelog | 9 +++++++++ debian/openafs-client.postinst | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 37c43d2dd..83530f340 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +openafs (1.4.12+dfsg-4) UNRELEASED; urgency=low + + * Preserve the AFS mount point and cache directorys set in + /etc/openafs/cacheinfo if the file already exists rather than + overwriting them with the defaults. Thanks, Liam Healy. + (Closes: #580077) + + -- Russ Allbery Tue, 04 May 2010 14:27:21 -0700 + openafs (1.4.12+dfsg-3) unstable; urgency=low * Apply upstream deltas: diff --git a/debian/openafs-client.postinst b/debian/openafs-client.postinst index f29916817..a12673238 100644 --- a/debian/openafs-client.postinst +++ b/debian/openafs-client.postinst @@ -62,8 +62,17 @@ if [ "$1" = configure ] || [ "$1" = reconfigure ] ; then fi fi + # Our config script will have already taken care of extracting the cache + # size from the cacheinfo file and using it as the default for the debconf + # prompt, but the mount point and cache directory have no debconf prompts. + # For those, we need to get the default from the file. + mountpoint=/afs + cachedir=/var/cache/openafs + if [ -r /etc/openafs/cacheinfo ] ; then + IFS=: read mountpoint cachedir < /etc/openafs/cacheinfo + fi db_get openafs-client/cachesize - echo /afs:/var/cache/openafs:$RET >/etc/openafs/cacheinfo + echo "${mountpoint}:${cachedir}:${RET}" > /etc/openafs/cacheinfo echo <<'EOF' > /etc/openafs/afs.conf.client # This file is managed by debconf. You may change the parameters set below, -- 2.39.5