From 5229d60a844d28bc120d28a382f3e85463fe79de Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Fri, 1 Nov 2024 17:39:25 +0100 Subject: [PATCH] tls: force write certificates to disk On embedded devices such as a RPI storage is more fragile and power loss can happen more frequently. Co-Authored-By: Jean-Marie Lemetayer --- src/tls/cockpit-certificate-helper.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tls/cockpit-certificate-helper.in b/src/tls/cockpit-certificate-helper.in index e109bcd51a2b..3a74cd3e3f77 100644 --- a/src/tls/cockpit-certificate-helper.in +++ b/src/tls/cockpit-certificate-helper.in @@ -14,11 +14,17 @@ install_cert() { # The certificate should be world-readable chmod a+r "${destination}" + + # Force flush to disk for embedded devices + sync "${destination}" } install_key() { local destination="${COCKPIT_WS_CERTS_D}/$1" mv -Z "$1" "${destination}" + + # Force flush to disk for embedded devices + sync "${destination}" } selfsign_sscg() {