Browse Source

Add a copy of stripcom so /etc/netstart can be run standalone again.

OK deraadt@
OPENBSD_3_7
millert 20 years ago
parent
commit
d40f10d2ee
1 changed files with 16 additions and 1 deletions
  1. +16
    -1
      src/etc/netstart

+ 16
- 1
src/etc/netstart View File

@ -1,6 +1,21 @@
#!/bin/sh -
#
# $OpenBSD: netstart,v 1.100 2004/12/19 15:37:58 millert Exp $
# $OpenBSD: netstart,v 1.101 2004/12/30 17:33:59 millert Exp $
# Strip comments (and leading/trailing whitespace if IFS is set)
# from a file and spew to stdout
stripcom() {
local _file="$1"
local _line
{
while read _line ; do
_line=${_line%%#*} # strip comments
test -z "$_line" && continue
echo $_line
done
} < $_file
}
# Returns true if $1 contains only alphanumerics
isalphanumeric() {


Loading…
Cancel
Save