From patchwork Fri Dec 3 17:37:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 4897 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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4J5Kls46V1z3wt5 for ; Fri, 3 Dec 2021 17:37:45 +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 ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4J5Klq32f6z2gW; Fri, 3 Dec 2021 17:37:43 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4J5Klp5qgwz2yV2; Fri, 3 Dec 2021 17:37:42 +0000 (UTC) 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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4J5Kln2bHxz2x9p for ; Fri, 3 Dec 2021 17:37:41 +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 ECDSA (P-384)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4J5Klm0rv3znC for ; Fri, 3 Dec 2021 17:37:39 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1638553060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8P0OGym2RYpNB6vwbO0SyjkkmFkZOd9ZLVSB8l5I2Tc=; b=3ZC6Ndf5VeRazzTUIrzKSitaY6U2sIrQRWQ1MhX/hZFb1wFvs5VyehZu6w3Tu2Zp4xDQpW C4X1W3uXnwzBXNDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1638553060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8P0OGym2RYpNB6vwbO0SyjkkmFkZOd9ZLVSB8l5I2Tc=; b=qM1rIbCmFsuhC6cc/y7Hx53DIFZvOOUDV0otC3bNrti7SljuDALjFxsi9aHF4NBGms0j9J FBGiicQ1hmxs6U3cYI17EL/a7TFN0GnlzKgYLpQEuNv1Xm8Esb4Dwg0SUFM2uFsylv+Kku hgPCwWwH+W85FnEigrQT8U9yXehXl3TOWnpL+EEPq+McZNKvGZ9jc9WsYXZin0OTFOjZgZ wfB3AwUKqydd25GuA0KgmW2wlC0aDF9fyTo8hpO7TM8mju4lbVPTw8WKoPNkR3UPfN5SVk hdsJRM2QN01zY6l6PjUEpUSPMx0APVcNkBxhDNOpI6UIayCe4F7OwdmVzvAgXw== To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [RFC PATCH] Core Update 163: Abort update.sh in case an uninitialised variable is found Message-ID: <9384fc32-2895-c585-ac06-d96ccc5668b7@ipfire.org> Date: Fri, 3 Dec 2021 18:37:38 +0100 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" This should never happen anyways, but better be safe than sorry. Signed-off-by: Peter Müller --- config/rootfiles/core/163/update.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/rootfiles/core/163/update.sh b/config/rootfiles/core/163/update.sh index e51dbf0b3..c1f23f25e 100644 --- a/config/rootfiles/core/163/update.sh +++ b/config/rootfiles/core/163/update.sh @@ -24,6 +24,9 @@ . /opt/pakfire/lib/functions.sh /usr/local/bin/backupctrl exclude >/dev/null 2>&1 +# Abort in case of uninitialised variables +set -u + core=163 exit_with_error() {