Hi, I've had an issue connecting to a wireless network
(by doas sh /etc/netstart $if). Its password contained
'#' character(s).

Even adding "debug" keyword did not assure me
whether the problem is with my password definition:
wpakey s3cur3-as-#311, for illustration (was not sure
if the '#' has to be escaped somehow); or somewhere
else. Finally, it was the latter, but it took me a while
to realize that.

Current hostname.if manpage is not absolutely clear:

  #    Comments are allowed.  Anything following a comment
      character is treated as a comment.

It suggests that what is before '#' might have a meaning,
while the broader context of the definition strongly suggests
that comment it is when '#' "keyword" is at the beginning.

Looking into /etc/netstart might also be confusing -
just at the beginning, there's stripcom() function definition,
which clearly strips the input line from '#' and following.
However, this function is NOT applied to /etc/hostname.if,
it is treated differently, entire line beginning with '#'
is skipped (see # Skip comments and empty lines).

I am therefore proposing following or similar change:

--- /usr/src/share/man/man5/hostname.if.5
+++ /usr/src/share/man/man5/hostname.if.5
@@ -201,7 +201,7 @@
 the interface, such as 64.
 .It Li #
 Comments are allowed.
-Anything following a comment character is treated as a comment.
+Line beginning with a comment character is treated as a comment.
 .It Li \&! Ns Ar command
 Arbitrary shell commands can be executed using this directive, as
 long as they are available in the single-user environment (for

Reply via email to