summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2017-04-07 22:15:18 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2017-04-07 22:15:18 +0000
commit3177f319273c6a4ff17651847f1a6fb51141ff18 (patch)
tree61fb672c9a5d81dff72820e2fb343b8dae4e21c4
parent072d14404b778d38a1d38b9638d590b186ffd352 (diff)
Align comments of ifstart() function in netstart and install.sub.
-rw-r--r--distrib/miniroot/install.sub21
-rw-r--r--etc/netstart5
2 files changed, 14 insertions, 12 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 8b8aace02ac..e81f59aa9b2 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.993 2017/04/07 22:02:29 rpe Exp $
+# $OpenBSD: install.sub,v 1.994 2017/04/07 22:15:17 rpe Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -2124,25 +2124,24 @@ ifstart () {
((NIFS++))
while :; do
if [ "$cmd2" ]; then
- # we are carrying over from the 'read dt dtaddr'
- # last time
+ # We are carrying over from the 'read dt dtaddr'
+ # last time.
set -- $cmd2
af=$1 name=$2 mask=$3 bcaddr=$4 ext1=$5 cmd2=
- # make sure and get any remaining args in ext2,
- # like the read below
+ # Make sure and get any remaining args in ext2,
+ # like the read below.
i=1
while [ i -lt 6 -a -n "$1" ]; do shift; let i=i+1; done
ext2="$@"
else
- # read the next line or exit the while loop
+ # Read the next line or exit the while loop.
read af name mask bcaddr ext1 ext2 || break
fi
- # $af can be "dhcp", "rtsol", an address family,
- # commands, or a comment.
+ # $af can be "dhcp", "rtsol", an address family, commands,
+ # or a comment.
case "$af" in
"#"*|"!"*|"bridge"|"")
- # skip comments, user commands, bridges,
- # and empty lines
+ # Skip comments, user commands, bridges, and empty lines.
continue
;;
"dhcp") [ "$name" = "NONE" ] && name=
@@ -2166,7 +2165,7 @@ ifstart () {
;;
*) read dt dtaddr
if [ "$name" = "alias" ]; then
- # perform a 'shift' of sorts
+ # Perform a 'shift' of sorts.
alias=$name
name=$mask
mask=$bcaddr
diff --git a/etc/netstart b/etc/netstart
index b57be3c624d..88476411356 100644
--- a/etc/netstart
+++ b/etc/netstart
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: netstart,v 1.173 2017/04/07 21:44:07 rpe Exp $
+# $OpenBSD: netstart,v 1.174 2017/04/07 22:15:17 rpe Exp $
# Turn off Strict Bourne shell mode.
set +o sh
@@ -22,7 +22,10 @@ stripcom() {
# Start a single interface.
# Usage: ifstart if1
ifstart() {
+ # Note: Do not rename the 'if' variable which is documented as being
+ # usable in hostname.if(5) files.
if=$1
+
# Interface names must be alphanumeric only. We check to avoid
# configuring backup or temp files, and to catch the "*" case.
[[ $if != +([[:alpha:]])+([[:digit:]]) ]] && return