]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Ignore errors when reading ThisCell
authorRuss Allbery <rra@debian.org>
Sat, 5 Oct 2013 18:27:16 +0000 (11:27 -0700)
committerRuss Allbery <rra@debian.org>
Sat, 5 Oct 2013 18:27:16 +0000 (11:27 -0700)
* 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
debian/openafs-client.config

index 7c9fabcf898d853662478d1809e59c04abff9d6b..c2bfffeeba048db2d9982118fb7154d77b29622e 100644 (file)
@@ -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 <rra@debian.org>  Sat, 05 Oct 2013 11:27:07 -0700
+
 openafs (1.6.5-1) unstable; urgency=high
 
   * New upstream release.
index 637960e20881df1addfd023e4ebd36e121eb4ddf..1000d14cee6024a2356206f694452d2f5fd9678a 100755 (executable)
@@ -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