]> git.ipfire.org Git - ipfire-2.x.git/commit
core194: Fix cert name and change other check to ! -s core194 v2.29-core194
authorAdolf Belka <adolf.belka@ipfire.org>
Thu, 1 May 2025 07:41:03 +0000 (09:41 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 May 2025 13:52:30 +0000 (13:52 +0000)
commit262809b881398c77f31d73a06f4b51461820fe85
treec9e71e9ff19c6db99c3c4433e51e20e05db62b2b
parentf0acc9e4a3a446307684dfe9ee9031313407546a
core194: Fix cert name and change other check to ! -s

- This v2 version corrects the b! -z to ! -s
- Error in hostcert extension
- -z is for use with strings and not with files. This should have been ! -s. Thanks to
   @Nick for spotting this and flagging it up. Th ! -z would do the test against the
   filename string and as this doesn't change then it would always come up true.
- I thought I had tested the original patch of this change but obviously not because
   there was missing whitespace and filenames not quoted plus the fixes I have added
   in this patch.
- I definitely tested this out this time by copying it from the update.sh and applying
   it to my vm system. I have also tested this out with the hostcert.pem file present
   and not and with the index.txt file empty and containing something. This now works
   as it should, which is to only carry out the edit on the serial file if the
   hostcert.pem file is present AND the index.txt file is empty.
- I clearly need to look more carefully at and test even more carefully at any bash
   statements that I put together.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/194/update.sh