fix core-cleanup script to invoke killall correctly
This commit is contained in:
parent
b844f647e3
commit
7d6b540a98
1 changed files with 8 additions and 2 deletions
|
@ -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 '
|
||||
|
|
Loading…
Reference in a new issue