]> git.ipfire.org Git - thirdparty/lxc.git/commit
Change file check to also check file size (`-f` => `-s`) 1811/head
authorRune Juhl Jacobsen <runejuhl@petardo.dk>
Mon, 18 Sep 2017 17:56:42 +0000 (19:56 +0200)
committerRune Juhl Jacobsen <runejuhl@petardo.dk>
Mon, 18 Sep 2017 17:56:42 +0000 (19:56 +0200)
commitfc20af631e7f0dd75e2f390552de837eeaa529d3
treec6c8725039165613acf0a2e36287ee3abe76335f
parent89dd4bff65d9912b9c43480e1a95e0bb181ba1b7
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@petardo.dk>
templates/lxc-alpine.in