Skip interfaces that are already UP before the test starts. We can
not change state of the test host this way, it breaks e.g. test systems with the root filesystem on NFS.
This commit is contained in:
parent
984bb2b315
commit
e6ac0f80fe
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_repeated_updown.sh,v 1.3 2020/06/27 04:15:17 jruoho Exp $
|
||||
# $NetBSD: t_repeated_updown.sh,v 1.4 2020/07/22 05:47:24 martin Exp $
|
||||
#
|
||||
# Copyright (c) 2020 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -42,14 +42,12 @@ repeated_updown_body() {
|
|||
|
||||
for i in $(ifconfig -l); do
|
||||
|
||||
state="up"
|
||||
ifconfig -s $i
|
||||
# skip all interfaces that are already marked UP
|
||||
ifconfig $i | fgrep -q UP >/dev/null && continue
|
||||
|
||||
if [ $? -eq 1 ]; then
|
||||
state="down"
|
||||
ifconfig $i up
|
||||
echo "Initialized $i up"
|
||||
fi
|
||||
state="down"
|
||||
ifconfig $i up
|
||||
echo "Initialized $i up"
|
||||
|
||||
while [ $n -gt 0 ]; do
|
||||
ifconfig $i down
|
||||
|
|
Loading…
Reference in New Issue