pf tests: destroy jails before destroying interfaces
When cleaning up we must destroy the jails before we destroy the interfaces. Otherwise we might try to destroy interfaces that belong to a jail, which won't work and fail to completely clean up.
This commit is contained in:
parent
23c5a51e92
commit
da86443874
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325020
@ -51,17 +51,17 @@ pft_set_rules()
|
||||
|
||||
pft_cleanup()
|
||||
{
|
||||
if [ -f created_interfaces.lst ]; then
|
||||
for ifname in `cat created_interfaces.lst`
|
||||
do
|
||||
ifconfig ${ifname} destroy
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -f created_jails.lst ]; then
|
||||
for jailname in `cat created_jails.lst`
|
||||
do
|
||||
jail -r ${jailname}
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -f created_interfaces.lst ]; then
|
||||
for ifname in `cat created_interfaces.lst`
|
||||
do
|
||||
ifconfig ${ifname} destroy
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user