Merge pull request #200 from coreemu/bugfix/fix-core-cleanup-killall

fix core-cleanup script to invoke killall correctly
This commit is contained in:
bharnden 2018-10-10 15:04:26 -07:00 committed by GitHub
commit eafaa100c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,10 +33,16 @@ if [ "z$2" = "z-l" ]; then
rm -f /var/log/core-daemon.log
fi
kaopts="-v"
killall --help 2>&1 | grep -q namespace
if [ $? = 0 ]; then
kaopts="$kaopts --ns 0"
fi
vnodedpids=`pidof vnoded`
if [ "z$vnodedpids" != "z" ]; then
echo "cleaning up old vnoded processes: $vnodedpids"
killall -v -KILL vnoded
killall $kaopts -KILL vnoded
# pause for 1 second for interfaces to disappear
sleep 1
fi
@ -54,7 +60,7 @@ eval "$ifcommand" | awk '
/^veth[0-9]+\./ {print "removing interface " $1; system("ip link del " $1);}
/tmp\./ {print "removing interface " $1; system("ip link del " $1);}
/gt\./ {print "removing interface " $1; system("ip link del " $1);}
/b\./ {print "removing bridge " $1; system("ip link set " $1 " down; brctl delbr " $1);}
/b\./ {print "removing bridge " $1; system("ip link set " $1 " down; ip link del " $1);}
'
ebtables -L FORWARD | awk '