Browse Source

Fix stripcom() description wrt. comments not on their own line

Neither netstart's nor install.sub's (subtly different) implementations
remove trailing comments on lines not starting as a comment, e.g.,
lines like "up #not down" go through unaltered and without "#not down"
being removed.
Only lines *beginning* with the comment sign ("#") are stripped.
No functional change, just updating function descriptions.
master
kn 4 years ago
parent
commit
8b521e7138
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/etc/netstart

+ 2
- 3
src/etc/netstart View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: netstart,v 1.203 2020/05/21 11:54:41 kn Exp $
# $OpenBSD: netstart,v 1.204 2020/05/21 13:42:02 kn Exp $
# Turn off Strict Bourne shell mode. # Turn off Strict Bourne shell mode.
set +o sh set +o sh
@ -11,8 +11,7 @@ usage() {
exit 1 exit 1
} }
# Echo file $1 to stdout. Skip comment lines and delete everything
# after the first '#' from other lines. Strip leading and trailing
# Echo file $1 to stdout. Skip comment lines. Strip leading and trailing
# whitespace if IFS is set. # whitespace if IFS is set.
# Usage: stripcom /path/to/file # Usage: stripcom /path/to/file
stripcom() { stripcom() {


Loading…
Cancel
Save