From patchwork Sat Mar 2 11:09:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonatan Schlag X-Patchwork-Id: 7577 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 ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Tn2Kp4H28z3wmD for ; Sat, 2 Mar 2024 11:09:50 +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 (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Tn2Kh4TzbzyP; Sat, 2 Mar 2024 11:09:44 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Tn2Kh2tcQz32gT; Sat, 2 Mar 2024 11:09:44 +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 (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Tn2Kg0h6nz301M for ; Sat, 2 Mar 2024 11:09:43 +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 (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Tn2Kd6HPzzq1; Sat, 2 Mar 2024 11:09:41 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1709377781; 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=36Bt7uLrsDiLeGPThik67R3QMIywi0S3A/AYTvz+lCE=; b=PD2t/ERM0cpG3HmvJIu7coSvEheXVGFJ+uqzI2qfZJxFSxEPeFX7NFFs27HS6Zv8TvzXWC W45dIAUn85sY1IBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1709377781; 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=36Bt7uLrsDiLeGPThik67R3QMIywi0S3A/AYTvz+lCE=; b=cJeU9p37W55d1zpoLZJwP0IhOE3rUxP0Z0xx88E/4iqXFC3Oxj9I7TyH0ZPsSGKX1SwBTq dRpizcM6HGhJxneoYzVvhAdKDEfjcjfxOJerkL1qWmGxbi1XGO7cavcfjLcs8u9N7oMLOT 45vOuXavU+fo/XEZHZwGSosDY01hzJ6ft93Y5KvhpaEj2EvikW1PSKkQoVmdWa5GN2v8D0 g91H3dY+Dtxw9l1GdnRdwHHX9j05IelVGAiGZp0KD8/ONeUiu9pZDchKcuxEMX/Df8uNWt 7XoyNllskMJ9JcKg9tvtXwh16sgqQt6FZ3ybFLby89VieejecVcNTEuAEISzTQ== From: Jonatan Schlag To: development@lists.ipfire.org Subject: [PATCH 1/5] functions.network: Add proper Exit Codes Date: Sat, 2 Mar 2024 12:09:24 +0100 Message-Id: <20240302110928.10377-1-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: 4L3UEE3UNE4U5BK6VJMWHAD5BQI5NPHZ X-Message-ID-Hash: 4L3UEE3UNE4U5BK6VJMWHAD5BQI5NPHZ X-MailFrom: jonatan.schlag@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This ist borrowed from here: https://git.ipfire.org/?p=network.git;a=blob_plain;f=src/functions/functions.constants;h=0d6cdd2fba47fa4db933b054496ed95cd3d905f3;hb=HEAD and can be extended later on. Signed-off-by: Jonatan Schlag --- src/initscripts/networking/functions.network | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/initscripts/networking/functions.network b/src/initscripts/networking/functions.network index 4c7ad51d4..dedbb6f7f 100644 --- a/src/initscripts/networking/functions.network +++ b/src/initscripts/networking/functions.network @@ -22,6 +22,10 @@ . /etc/sysconfig/rc . $rc_functions +# Proper error codes +EXIT_TRUE=0 +EXIT_FALSE=1 + eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings) eval $(/usr/local/bin/readhash /var/ipfire/dns/settings)