Somewhere in the CVS to SVN conversion, or maybe it was just me using ViM incorrectly...
[mom.git] / pl_mop.sh
index 80fcb41..0471513 100755 (executable)
--- a/pl_mop.sh
+++ b/pl_mop.sh
@@ -5,7 +5,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2005 The Trustees of Princeton University
 #
-# $Id: pl_mop.sh,v 1.8 2007/02/14 20:48:46 faiyaza Exp $
+# $Id$
 #
 
 PATH=/sbin:/usr/sbin:$PATH
@@ -203,10 +203,22 @@ kill_duplicate_ssh() {
     done
 }
 
+kill_nm_inslice(){
+    pids=$(vps aux | awk '$1 != "root" && $14 == "/usr/share/NodeManager/nm.py" {print $2}')
+    for pid in $pids ; do
+               line=$(vps aux | grep $pid)
+               echo Killing PID $pid
+               echo $line
+               kill -9 $pid
+       done
+}
+
 # XXX kill zombie slices
 
 # XXX reboot if boot state changes
 
+run kill_nm_inslice
+
 run fix_vservers
 
 run fix_etc_shadow