[lxc-devel] [lxc/lxc] fc20af: Change file check to also check file size (`-f` =>...

GitHub noreply at github.com
Mon Sep 18 23:05:14 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: fc20af631e7f0dd75e2f390552de837eeaa529d3
      https://github.com/lxc/lxc/commit/fc20af631e7f0dd75e2f390552de837eeaa529d3
  Author: Rune Juhl Jacobsen <runejuhl at petardo.dk>
  Date:   2017-09-18 (Mon, 18 Sep 2017)

  Changed paths:
    M templates/lxc-alpine.in

  Log Message:
  -----------
  Change file check to also check file size (`-f` => `-s`)

Because the `fetch` wget wrapper outputs files to stdout we may end up in a
situation where wget fails but the files are still created. This can happen
e.g. when the host date is out of sync leading to a failed certificate
check, resulting in the creation of empty key files.

Once the empty files have been created the template will try to use them which
causes the certificate check to fail.

By using `-s` instead of `-f` the template will re-fetch the files unless they
exist AND have a size greater than zero.

Signed-off-by: Rune Juhl Jacobsen <runejuhl at petardo.dk>


  Commit: aedfcb8acb3068f8ec49d65bf9bbaf9f1ef38217
      https://github.com/lxc/lxc/commit/aedfcb8acb3068f8ec49d65bf9bbaf9f1ef38217
  Author: Stéphane Graber <stgraber at stgraber.org>
  Date:   2017-09-18 (Mon, 18 Sep 2017)

  Changed paths:
    M templates/lxc-alpine.in

  Log Message:
  -----------
  Merge pull request #1811 from runejuhl/fix-alpine-apk-keys

Change alpine template file check to also check file size (`-f` => `-s`)


Compare: https://github.com/lxc/lxc/compare/6cc7d050ca70...aedfcb8acb30


More information about the lxc-devel mailing list