From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4bk4wM3Qptz2ywH for ; Fri, 18 Jul 2025 09:57:39 +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 RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4bk4wH6mwbz2xXK for ; Fri, 18 Jul 2025 09:57:35 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "michael.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4bk4wH0Nflz12m; Fri, 18 Jul 2025 09:57:35 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4bk4wG6M9PzTgg7; Fri, 18 Jul 2025 09:57:34 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Cc: Michael Tremer Subject: [PATCH] wireguard-functions.pl: Remove any carriage returns on import Date: Fri, 18 Jul 2025 09:57:34 +0000 Message-Id: <20250718095734.1042987-1-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.5 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Some files might include carriage returns which won't be removed by chomp() on Linux. To be extra safe, we remove them manually. Signed-off-by: Michael Tremer --- config/cfgroot/wireguard-functions.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/cfgroot/wireguard-functions.pl b/config/cfgroot/wireguard-functions.pl index f98cec408..1dc80f2c0 100644 --- a/config/cfgroot/wireguard-functions.pl +++ b/config/cfgroot/wireguard-functions.pl @@ -488,6 +488,9 @@ sub parse_configuration($$) { # Remove line breaks chomp; + # Remove any carriage returns + $_ =~ s/\r$//; + # Search for section headers if ($_ =~ m/^\[(\w+)\]$/) { $section = $1; -- 2.39.5