From: rpe Date: Fri, 7 Apr 2017 22:02:29 +0000 (+0000) Subject: Sync variable names with netstart version of stripcom(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8986db2cd686832445d56baeb1326dfe1adf763b;p=openbsd Sync variable names with netstart version of stripcom(). Use $_file variable instead of $1 with the wile-loop. --- diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 6c7cce88910..8b8aace02ac 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.992 2017/04/07 21:44:07 rpe Exp $ +# $OpenBSD: install.sub,v 1.993 2017/04/07 22:02:29 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -193,14 +193,14 @@ show_cols() { # after the first '#' from other lines. Strip leading and trailing # whitespace if IFS is set. stripcom () { - local _l + local _file=$1 _line - [[ -f $1 ]] || return + [[ -f $_file ]] || return set -o noglob - while read _l; do - [[ -n ${_l%%#*} ]] && echo $_l - done <$1 + while read _line; do + [[ -n ${_line%%#*} ]] && echo $_line + done <$_file set +o noglob }