I have looked for the discussion on how to prevent a client from
execution a program multiple times. ( I think it was on this list )
I was unable to find it so I wrote the following bash script
and plan to put it into    /usr/sbin/noprogdup.sh  .  Please
critique/discuss the script to help me improve it so that 
I will be able to prevent 16 young clients from starting 55 
instances of TuxPaint and other programs.

---------cut------------
#!/bin/bash
prog=$1
myline=$*
# check for some input if $prog is not empty
if [ ! -z $prog ]
then
  targ=`ps -U $USER | grep $prog | awk '{print $4}'`
  if [ -z $targ ]
  then
    eval $myline
  fi ## -z $targ
fi ## -z $prog 
---------end-cut--------

TIA
Jim Rich


-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to