diff options
author | Todd T. Fries <todd@cvs.openbsd.org> | 2000-01-10 02:04:08 +0000 |
---|---|---|
committer | Todd T. Fries <todd@cvs.openbsd.org> | 2000-01-10 02:04:08 +0000 |
commit | b69a9f1d7d7df2be242a1e4400037a51cceedd39 (patch) | |
tree | 8a7eb4bbfceb5ebe0cf760e28bb2be571a81325e /etc/netstart | |
parent | 139304e682195d944a047269e00d314777853946 (diff) |
allow arbitrary commands in /etc/hostname.* files if the line starts with '!'
Diffstat (limited to 'etc/netstart')
-rw-r--r-- | etc/netstart | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/etc/netstart b/etc/netstart index a98c0cfdee9..d78c12e9260 100644 --- a/etc/netstart +++ b/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.62 2000/01/02 06:50:09 deraadt Exp $ +# $OpenBSD: netstart,v 1.63 2000/01/10 02:04:07 todd Exp $ # Returns true if $1 contains only alphanumerics isalphanumeric() { @@ -86,10 +86,15 @@ for hn in /etc/hostname.*; do # read the next line or exit the while loop read af name mask bcaddr ext1 ext2 || break fi - # skip comments - [ "${af#*#}" = "${af}" ] || continue - # $af can be either "dhcp", "up" or an address family. + # $af can be "dhcp", "up", "rtsol", an address family, commands, or + # a comment. case "$af" in + "#"*) # skip comments + continue + ;; + "!"*) # parse commands + cmd="${af#*!} ${name} ${mask} ${bcaddr} ${ext1} ${ext2}" + ;; "bridge") cmd="echo ${hn}: bridges now supported via bridgename.* files" ;; |