Message: previous - next
Month: February 2014

Please revert commit 77aed4a4 [Add nominal preventive maintenance in starttde]

From: Fran├žois Andriot <francois.andriot@...>
Date: Tue, 25 Feb 2014 19:47:06 +0100
I've just found out some changes in the "starttde" script, see commit 

I do not agree with what that patch for 2 reasons:

1) The principe: on my computer, I'm using TDE both on local session and 
in remote session at the same time, using the same user account.
So when I login remotely, this patch will probably kill my 
locally-opened session ...

2) The way it is written: there are several piped commands (why not 
using a single awk or simply use bash ?) and the code is not robust at 
all. What is my user is called "greppy" for example ? (ok this is 
unlikely, but not impossible). The "grep -v grep" will eliminate this 
line ...

Please avoid using a full-featured "ps" output then  trying to parse the 
The "ps" command can already filter on user  (ps -u $USER) and select 
output format (ps -o field1,field2 ...)

So, at very least, the command could look like :

ps -u ${USER} -o pid,cmd h | while read pid command args; do
   case "${command##*/}" in "dcopserver"|"gam_server")
     kill $pid ;;

Another approach would be to parse the /proc/[0-9]*/ folders, to avoid 
using any "ps" command at all...