From patchwork Tue Aug 29 08:52:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonatan Schlag X-Patchwork-Id: 7126 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 4RZh5l213zz3wtG for ; Tue, 29 Aug 2023 08:52:59 +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 4RZh5k6MQ1zj5; Tue, 29 Aug 2023 08:52:58 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4RZh5k5vkcz2yWd; Tue, 29 Aug 2023 08:52:58 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4RZh5j422rz2xc7 for ; Tue, 29 Aug 2023 08:52:57 +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 4RZh5j2WC2zj5; Tue, 29 Aug 2023 08:52:57 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1693299177; 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=khKwUsimcCcMxuaFAkgnHyX5vaIwsDc+dFoSYqLk1Pc=; b=1Jb0oOtaWXpChxhU1Fz19nrnMNVxRoMAOL336wWOCBpUwS8LLyPiR6CzeYjZmYXm2vQBDm SK55+d0nK2uP4BAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1693299177; 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=khKwUsimcCcMxuaFAkgnHyX5vaIwsDc+dFoSYqLk1Pc=; b=E/cHQ6xeWZl7PQsXBM2jxCG6Pfv+e4AqNRHopEHJ1F/BiEVFukIZ2iCm5ANvqDoOt6bieA D6m93oJpFwFrV4ujT7Q4MLsH+FSgYtGEE0GCp0ueHhqyMsKVOH5XU7hMSJloqrlXh9PNUD DR+CEEgp0JJNI2gRV1kmJLA0L1r5x7rOmaHbyyiS5nuU0ZE6qX41IlK+4O9HHyfiVT5Opn wmZbMxf6jOQH/H8w/lTyAX5qhpXzyRL/dDZXF9mhGpXLnkRqrEqCtXBmkOMqFFvzdQJQkD 3jgjkoE6pdo7XUtMh+Qdlrbe2Fzg2LEDV5+V/+f0s7GEmWfnhNQxgSxKwZ+6rA== From: Jonatan Schlag To: development@lists.ipfire.org Subject: [PATCH 2/5] Use bash as shebang in network initscripts Date: Tue, 29 Aug 2023 10:52:38 +0200 Message-Id: <20230829085241.6985-2-jonatan.schlag@ipfire.org> In-Reply-To: <20230829085241.6985-1-jonatan.schlag@ipfire.org> References: <20230829085241.6985-1-jonatan.schlag@ipfire.org> MIME-Version: 1.0 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" /bin/sh is a symlink to /bin/bash on ipfire systems. Using /bin/sh in the scripts as shebang hurts in two ways: 1. We use features which do not work with sh as shell. This is not really a problem but if we rely on features of a real bash we can state this clearly. 2. The syntay highlighting in vim does not work without a correct shebang. As I want and need correct syntax highlighting I propose to change the shebang. Signed-off-by: Jonatan Schlag --- src/initscripts/networking/any | 2 +- src/initscripts/networking/functions.network | 2 +- src/initscripts/networking/red | 2 +- src/initscripts/networking/red.up/99-pakfire-update | 2 +- src/initscripts/system/network | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/initscripts/networking/any b/src/initscripts/networking/any index 15197badb..dc4796e91 100644 --- a/src/initscripts/networking/any +++ b/src/initscripts/networking/any @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall # diff --git a/src/initscripts/networking/functions.network b/src/initscripts/networking/functions.network index 0e2e5009e..4c7ad51d4 100644 --- a/src/initscripts/networking/functions.network +++ b/src/initscripts/networking/functions.network @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall # diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index 75a17bd5a..9da3ea406 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall # diff --git a/src/initscripts/networking/red.up/99-pakfire-update b/src/initscripts/networking/red.up/99-pakfire-update index 3cc79a107..56cee66aa 100644 --- a/src/initscripts/networking/red.up/99-pakfire-update +++ b/src/initscripts/networking/red.up/99-pakfire-update @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash nice -n 10 /opt/pakfire/pakfire update >/dev/null 2>&1 & diff --git a/src/initscripts/system/network b/src/initscripts/system/network index 9ef3fb0d8..16609175a 100644 --- a/src/initscripts/system/network +++ b/src/initscripts/system/network @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall #