From patchwork Thu Apr 11 15:01:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7733 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) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4VFjZv5ycLz3wwD for ; Thu, 11 Apr 2024 15:01:43 +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) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4VFjZt6T99z5VR; Thu, 11 Apr 2024 15:01:42 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4VFjZj26cbz32jQ; Thu, 11 Apr 2024 15:01:33 +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) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4VFjZQ697Jz32ql for ; Thu, 11 Apr 2024 15:01:18 +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 4VFjZQ4j4XzGf; Thu, 11 Apr 2024 15:01:18 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1712847678; 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: in-reply-to:in-reply-to:references:references; bh=P6Tv9SfDn+CBKuNWCLZwem0xkZ0/CZt9ZrE0D3CncxQ=; b=KbnoQx0o3KLh+vPkhp5gvXDC6eu9r2+l5CGaEyarXXMaiCJxvrpNBz4HZ0+XVd1+h6tv0z CRyJsw0p1OvnbCBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1712847678; 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: in-reply-to:in-reply-to:references:references; bh=P6Tv9SfDn+CBKuNWCLZwem0xkZ0/CZt9ZrE0D3CncxQ=; b=ifSYgIGr2OWth6fv8hT8nQOyiKMStpyE2y+PYWXunAsBsgqikFL2mU5lF56n94lkCNGuCO MexusuRIZew8UmZ+t501Nz40LZnHmcwykg0Fs0IIblryd0DCMLp5y9MkXW/QkE0GLpfQA6 Ywde7eWGagJajYv4H1BzPdZrCtA7hgHI/fiWDbgTN9EfRW4XZW1gAIpb54jZV2fPlsMH66 8mzLR+1pQWj5XROvU5QxKQFVyMFpTWS0/qC+odor7zWSIS7O1JhCMg/8Y9GFulQ0ZWw2Zh AIpdoPeEv2qcEzxRc/7tUvV5mE23HrviN2oL5KxkUKdTJBWc6tAaIY3sRTA3EQ== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 9/9] oci-setup: Fixes bug12763 Date: Thu, 11 Apr 2024 17:01:08 +0200 Message-ID: <20240411150108.21573-9-adolf.belka@ipfire.org> In-Reply-To: <20240411150108.21573-1-adolf.belka@ipfire.org> References: <20240411150108.21573-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: VPGFBI4EAI3WHPJYGB42XNX634UBIINB X-Message-ID-Hash: VPGFBI4EAI3WHPJYGB42XNX634UBIINB X-MailFrom: adolf.belka@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 ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot if an empty table is accessed. Fixes: Bug#12763 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- src/initscripts/helper/oci-setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/initscripts/helper/oci-setup b/src/initscripts/helper/oci-setup index 312014b74..727537343 100644 --- a/src/initscripts/helper/oci-setup +++ b/src/initscripts/helper/oci-setup @@ -304,8 +304,8 @@ case "${reason}" in ip addr add "${new_ip_address}/${new_subnet_mask}" dev "${interface}" # Add the default route - ip route add "${new_routers}" dev "${interface}" - ip route add default via "${new_routers}" + ip route add "${new_routers}" dev "${interface}" >/dev/null 2>&1 + ip route add default via "${new_routers}" >/dev/null 2>&1 # Setup DNS for domain_name_server in ${new_domain_name_servers}; do