From patchwork Tue May 23 17:23:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonatan Schlag X-Patchwork-Id: 6902 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 4QQh4X2SgQz3wlf for ; Tue, 23 May 2023 17:23: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 ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4QQh4W1XQxz1YF; Tue, 23 May 2023 17:23:55 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4QQh4W0zfJz302K; Tue, 23 May 2023 17:23:55 +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 4QQh4T4pZHz2ydF for ; Tue, 23 May 2023 17:23:53 +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) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4QQh4T3FxFzfB; Tue, 23 May 2023 17:23:53 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1684862633; 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=OqqrJVCGkTdfig6Fd4hMRKeiZFKzSlh/sdwjOMwXKt8=; b=q3Yaphk4k/mClxoEa8bNl4bodz1Kn82A+TfONVWzuaGPdrctEtC4lIBIODl+MEVLlBvyHt RIdyDAiiAG6qcdDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1684862633; 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=OqqrJVCGkTdfig6Fd4hMRKeiZFKzSlh/sdwjOMwXKt8=; b=eINn1H/ZkQBXDxso2nHa63kqcsnesEziim6ChDk89/hSQ96lyIF4cGIQ0faDI45zcfGQfR BQS5lyGs6pjzg7Q8NQHsFkbb4kMKKy4il5far1NbfwioGhJp7O13JgjsMCEc1ashJ2xLAZ Tj5jsaoSx5dsgIWHam77lioi1/VEtm8kOh38XW5y7l5yYSrNWCR/YnbrXOMTXuFFxvKQDa +Hymmhl/sfxzEUJKiKWdOjL/ZuaoRXEvC/M/i49Ohb1KE04jzNhjuhLWZZs7orz/qa6yMi /3zU44yEc/+efV6Q++eWmQSTDSEyskc1YNZEPslDdVPGtneWh8qKyfd1Q1u0zQ== From: Jonatan Schlag To: development@lists.ipfire.org Subject: [Patch RFC 03/15] Use bash as shebang in network initscripts Date: Tue, 23 May 2023 19:23:03 +0200 Message-Id: <20230523172314.7826-4-jonatan.schlag@ipfire.org> In-Reply-To: <20230523172314.7826-1-jonatan.schlag@ipfire.org> References: <20230523172314.7826-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 16d48f3ac..8e41314b6 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 7e457edfa..0d63b4e8b 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 #