From patchwork Wed Apr 30 14:17:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8649 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ZnfR849J6z3x3j for ; Wed, 30 Apr 2025 14:17:56 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ZnfR80fZtz39H for ; Wed, 30 Apr 2025 14:17:56 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZnfR771jZz339m for ; Wed, 30 Apr 2025 14:17:55 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZnfR46snLz30NY for ; Wed, 30 Apr 2025 14:17:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ZnfR33VH3z8Y; Wed, 30 Apr 2025 14:17:51 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1746022671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=QoTumWhgBjkUbd1GF7/XigRWWdl4Pnz/JfI8J2y7pmI=; b=9Yzp88bahNoO6FPOD0lOEYpj6/jh2pVDaF1GK0JB7kb6C1OuPA9pWjCwA5WyZv78e+iWe/ Dg7QdtN3vx12joDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1746022671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=QoTumWhgBjkUbd1GF7/XigRWWdl4Pnz/JfI8J2y7pmI=; b=K7ESPPpR7+vkqZIgObnNfCG6jjR83Ku0s4PxGLpQ9rOmy+x0Cul8R7h3d6yNqeBM0F9N2i 5uB8G1RjcIM+r+an4tp4w/yAFOouUYdjpmpyhTdc79fzw1IuQonrDqiwvY7FrV1Norjve1 tzyBCxuxYEe29zMyvgrMRil9DSSgP/h/YurrIa7bQQ4+VIjFwTgtyGOyrLHDSV/ts4RCD+ iksedoqVxuNlLxgRhXoXcmdt5iwO+DHXsMWnyE3tC6q5JPtLOnylSyBH+eTYFirDD0ZzN/ RnB+oSrXhfJ8edSAJwEtatzyXYKFi3zDuN3k/C+ofl/idXTNHvkpZZ61cOd6dw== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH] core194: Fix cert name and change other check to ! -z Date: Wed, 30 Apr 2025 16:17:46 +0200 Message-ID: <20250430141746.44261-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - Error in hostcert extension - -z gives true if not zero and we need true if it is zero so had to add not command. - 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. Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- config/rootfiles/core/194/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/rootfiles/core/194/update.sh b/config/rootfiles/core/194/update.sh index b758c7bf6..8fbf22750 100644 --- a/config/rootfiles/core/194/update.sh +++ b/config/rootfiles/core/194/update.sh @@ -104,7 +104,7 @@ ldconfig /usr/local/bin/filesystem-cleanup # Increment ipsec serial file if x509 certificates present and no content in index.txt -if [ -e "/var/ipfire/certs/hostcert.pm" ] && [ -z "/var/ipfire/certs/index.txt" ]; then +if [ -e "/var/ipfire/certs/hostcert.pem" ] && [ ! -z "/var/ipfire/certs/index.txt" ]; then sed -i "s/01/02/" /var/ipfire/certs/serial fi