mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 22:46:58 +02:00
Merge pull request #2667 from flatcar/ca-certs-missing-newline-fix
app-misc/ca-certificates: Account for certs missing newlines
This commit is contained in:
commit
d3c8c8f4a8
@ -0,0 +1 @@
|
||||
- Fix update-ca-certificates behavior when concatenating certificates with missing trailing newlines. ([flatcar/scripts#2667](https://github.com/flatcar/scripts/pull/2667))
|
@ -32,7 +32,8 @@ if [[ ! -e "${CERTBUNDLE}" || "${CERTSDIR}" -nt "${CERTBUNDLE}" ]]; then
|
||||
trap "rm -f '${CERTSDIR}/${TEMPBUNDLE}'" EXIT
|
||||
|
||||
# Use .0 instead of .pem to pull in only what c_rehash validated
|
||||
cat "${CERTSDIR}"/*.[0-9] > "${TEMPBUNDLE}"
|
||||
sed --separate '$a\' "${CERTSDIR}"/*.[0-9] >"${TEMPBUNDLE}"
|
||||
|
||||
chmod 644 "${TEMPBUNDLE}"
|
||||
mv -f "${TEMPBUNDLE}" "${CERTBUNDLE}"
|
||||
trap - EXIT
|
||||
|
Loading…
Reference in New Issue
Block a user