summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/image_signing/ensure_sane_lsb-release.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/image_signing/ensure_sane_lsb-release.sh b/scripts/image_signing/ensure_sane_lsb-release.sh
index 9e5a179d..4d958b34 100755
--- a/scripts/image_signing/ensure_sane_lsb-release.sh
+++ b/scripts/image_signing/ensure_sane_lsb-release.sh
@@ -74,7 +74,10 @@ lsb_syntaxcheck() {
# Also checks for = with no spaces on either side.
# Checks that the value contains printables (and not starting with space).
# Alternatively, the value is permitted to be empty (0 chars) too.
- badlines=$(grep -Ev '^[A-Z][A-Z_]*=([[:graph:]][[:print:]]*)?$' "$lsbfile")
+ # Allow comments to start with #.
+ badlines=$(grep -Ev \
+ -e '^[A-Z][A-Z_]*=([[:graph:]][[:print:]]*)?$' \
+ -e '^[[:space:]]*#' "${lsbfile}")
if [ -n "$badlines" ]; then
syntaxbad=1
error "${lsbfile}: Some lines seem non-well-formed:"