[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#985853: debian-installer: Whitespace before a commented line in preseed file causes line to be parsed

On Thu, Mar 25, 2021 at 09:45:17AM +1030, Andrew McDonnell wrote:
> Package: debian-installer
> Version: 20190702+deb10u8
> Severity: important
> Tags: d-i
> In a preseed file I accidentally had a space before a comment character, which
> caused my preseed to fail in unexpected ways. I could not find anythying that
> stood out in the documentation (e.g.
> https://www.debian.org/releases/buster/amd64/apbs04.en.html or
> https://www.debian.org/releases/stable/amd64/apbs03.en.html) stating that this
> would occur.
> The specific example in my case looked like this:
> #_preseed_V1
> d-i debian-installer/locale string en_AU
> d-i keyboard-configuration/xkb-keymap select us
> d-i keymap select us
> ... etc ...
> # Example of fetching a script to run
>  #d-i preseed/run string
> My install was hanging and when I entered a console and looked in the syslog,
> it was attempting to access that script for which the IP address does not exist
> on my network. I finally started to understand the problem when I did this, the
> latter finally triggered a parse error in the installer console:
>  #d-iWHATpreseed/run string
>  #d-iWHATpreseed/runISstringHAPPENINGhttp://
> at this point I saw the white space, removed it and the problem went away.
> (I am also unsure whether "d-iWHAT" is also a bug or just some default applying
> if the item owner is not found)
> So I guess that either
> - whitespace is disallowed before a comment character and this should be added
> to https://www.debian.org/releases/stable/amd64/apbs03.en.html - it mentioned
> whitespace between fields but not at the start of a line
> - this is a bug

Well none of the examples ever have spaces before # for comments.
The documentation page you linked to doesn't even mention comments at all.
I would agree that perhaps it should.  I have certainly encountered file
types before where comments had to have # at the start of the line.

Len Sorensen

Reply to: