From: kn Date: Sun, 18 Feb 2018 01:50:04 +0000 (+0000) Subject: Simplify interface listing. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e5d18f06770faf12575c520d0e7c07a9adb5ccf2;p=openbsd Simplify interface listing. Discussed with tb, rpe, feedback from and OK halex. --- diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 4cf38bf2546..740064a86a8 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1062 2018/02/18 00:43:16 rpe Exp $ +# $OpenBSD: install.sub,v 1.1063 2018/02/18 01:50:04 kn Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -329,8 +329,7 @@ get_dkdevs_uninitialized() { get_ifs() { local _if _iflist=$(rmel vlan $(ifconfig -C)) - for _if in $(ifconfig "$@" 2>/dev/null | - sed -n 's/^\([^[:space:]]*\):.*/\1/p'); do + for _if in $(ifconfig "$@" 2>/dev/null | sed '/^[a-z]/!d;s/:.*//'); do isin "${_if%%+([0-9])}" $_iflist || echo $_if done }