git: c5e5722220e0 - main - tests: Use ifconfig -j instead of jexec ifconfig.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Oct 2023 16:40:23 UTC
The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e5722220e091737c70ef4b6571480ad4188fed commit c5e5722220e091737c70ef4b6571480ad4188fed Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2023-10-06 16:40:07 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2023-10-06 16:40:07 +0000 tests: Use ifconfig -j instead of jexec ifconfig. Reviewed by: kp, asomers Differential Revision: https://reviews.freebsd.org/D42110 --- tests/sys/common/vnet.subr | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index 50abadaec81d..183f7284d614 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -79,7 +79,7 @@ vnet_ifrename_jail() ifname=$2 ifnewname=$3 - jexec ${jailname} ifconfig $ifname name $ifnewname + ifconfig -j ${jailname} $ifname name $ifnewname sed -i "" "/^${jailname}/s/${ifname}/${ifnewname}/" created_jails.lst } @@ -88,7 +88,7 @@ vnet_cleanup() if [ -f created_jails.lst ]; then while read jailname ifnames; do for ifname in ${ifnames}; do - jexec ${jailname} ifconfig ${ifname} destroy + ifconfig -j ${jailname} ${ifname} destroy done jail -r ${jailname} done < created_jails.lst @@ -96,10 +96,9 @@ vnet_cleanup() fi if [ -f created_interfaces.lst ]; then - for ifname in `cat created_interfaces.lst` - do + while read ifname; do ifconfig ${ifname} destroy - done + done < created_interfaces.lst rm created_interfaces.lst fi }