From 0ccf513cf321508fd0709c7fb8f5285d060370cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Michel=20Nirgal=20Vourg=C3=A8re?= Date: Tue, 21 Apr 2015 14:37:18 +0200 Subject: [PATCH] Allow # within configuration file comments Line 20 of /etc/xen-tools/xen-tools.conf says: "Anything following a '#' character is ignored as a comment." This patch allows two or more hash characters in one row of the configuration files. Everything after the *first* hash is now ignored. Closes: #783060 --- lib/Xen/Tools/Common.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Xen/Tools/Common.pm b/lib/Xen/Tools/Common.pm index ccbaffa..e4815f1 100644 --- a/lib/Xen/Tools/Common.pm +++ b/lib/Xen/Tools/Common.pm @@ -70,7 +70,7 @@ sub readConfigurationFile ($$) next if ( length($line) < 1 ); # Strip trailing comments. - if ( $line =~ /(.*)\#(.*)/ ) + if ( $line =~ /([^#]*)\#(.*)/ ) { $line = $1; }