1
0
mirror of synced 2026-01-19 17:18:39 +00:00

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
This commit is contained in:
Jean-Michel Nirgal Vourgère 2015-04-21 14:37:18 +02:00 committed by Axel Beckert
parent 94341ccd43
commit 0ccf513cf3

View File

@ -70,7 +70,7 @@ sub readConfigurationFile ($$)
next if ( length($line) < 1 );
# Strip trailing comments.
if ( $line =~ /(.*)\#(.*)/ )
if ( $line =~ /([^#]*)\#(.*)/ )
{
$line = $1;
}