From 7ddde769d5f03d995f742d5246c23789c1c4b493 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 8 Feb 2008 19:18:02 +0000 Subject: [PATCH] Add wkill script git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@427 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client-2.0/bin/wkill | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 xCAT-client-2.0/bin/wkill diff --git a/xCAT-client-2.0/bin/wkill b/xCAT-client-2.0/bin/wkill new file mode 100755 index 000000000..f2b80e1b5 --- /dev/null +++ b/xCAT-client-2.0/bin/wkill @@ -0,0 +1,22 @@ +#!/bin/sh +if [ -z "$1" ] +then + if kill $(ps auxww | grep "$DISPLAY" | grep rcons | grep -v grep | awk '{print $2}') >/dev/null 2>&1 + then + exit 0 + else + echo "\n${MYNAME}: no wcons windows on $DISPLAY\n" + exit 1 + fi +else + for i in $(nodels $1) + do + if kill $(ps auxww | grep "$DISPLAY" | grep rcons | egrep "\b$i\b" | grep -v grep | awk '{print $2}') >/dev/null 2>&1 + then + : + else + echo "${MYNAME}: no $i wcons window on $DISPLAY" + fi + done +fi +