git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1561 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
		
			
				
	
	
		
			23 lines
		
	
	
		
			646 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			646 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/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
 | 
						|
 |