* [PATCH] wireguard-functions.pl: Remove any carriage returns on import
@ 2025-07-18 9:57 Michael Tremer
0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2025-07-18 9:57 UTC (permalink / raw)
To: development; +Cc: Michael Tremer
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 <michael.tremer@ipfire.org>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-18 9:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-18 9:57 [PATCH] wireguard-functions.pl: Remove any carriage returns on import Michael Tremer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox