Jens Langner wrote:
However, I just found another minor bug in one of SRSS 4.2's shell
files. This time in the
/opt/SUNWut/lib/prototype/Xsetup.SUNWut.prototype file around line 280
where via "ps" the command is queried and written to the session_proc file.

Are you seeing an error in system operation as a result of this?

-Bob

In the original file the following ps command sequence is used:

-- cut here --
  /bin/ps -p $PPID -o comm | \
  sed -n '$s/^/program=/p' >> $SESSION_PROC
-- cut here --

So "-o comm" is used. However, on Linux the output of "-o comm" is
slightly different. First it will output the command without it's full
path and it will also truncate the output after 15 characters.

So to stay compatible to the way solaris is writing the session command
into the session_proc file one have to use "-o cmd" instead on linux and
then cut out the first word of the answer of the ps command.

Here I have solved that situation with the following statements in Xsetup:

-- cut here --
if [ `uname` = "Linux" ]
then
  /bin/ps -p $PPID -o cmd | \
  /usr/bin/cut -d ' ' -f 1 | \
  sed -n '$s/^/program=/p' >> $SESSION_PROC
else
  /bin/ps -p $PPID -o comm | \
  sed -n '$s/^/program=/p' >> $SESSION_PROC
fi
-- cut here --

That way the session_proc file has the very same output/content on Linux
and Solaris, which IMHO seems to be quite important.

regards,
jens

_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to