From 3204d56d2b447a74dc33ef4d743c8b33f477ee8c Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sat, 5 Oct 2013 11:27:16 -0700 Subject: [PATCH] Ignore errors when reading ThisCell * Ignore errors when reading ThisCell in the openafs-client config script. If the file doesn't end in a newline, read will still succeed and set the variable, but will exit with a non-zero status. This would abort configuration of the package without a useful error message. --- debian/changelog | 10 ++++++++++ debian/openafs-client.config | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7c9fabcf8..c2bfffeeb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +openafs (1.6.5-2) UNRELEASED; urgency=low + + * Ignore errors when reading ThisCell in the openafs-client config + script. If the file doesn't end in a newline, read will still succeed + and set the variable, but will exit with a non-zero status. This + would abort configuration of the package without a useful error + message. + + -- Russ Allbery Sat, 05 Oct 2013 11:27:07 -0700 + openafs (1.6.5-1) unstable; urgency=high * New upstream release. diff --git a/debian/openafs-client.config b/debian/openafs-client.config index 637960e20..1000d14ce 100755 --- a/debian/openafs-client.config +++ b/debian/openafs-client.config @@ -9,7 +9,7 @@ db_version 2.0 # failing that, the lowercased local domain name, if available. Ignore errors # on read, since it may fail if there's no newline in the file. if [ -r /etc/openafs/ThisCell ] ; then - read cell < /etc/openafs/ThisCell + read cell < /etc/openafs/ThisCell || true db_set openafs-client/thiscell "$cell" fi db_get openafs-client/thiscell || true -- 2.39.5