www.cendio.com
Bug 1443 - Init scripts returns incorrect status for ordinary users
: Init scripts returns incorrect status for ordinary users
Status: CLOSED FIXED
: ThinLinc
VSM Agent
: 1.4.0
: PC Linux
: P2 Normal
: 4.1.1
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-08-15 15:44 by
Modified: 2013-10-24 10:46 (History)
Acceptance Criteria:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2005-08-15 15:44:13
When running "/etc/init.d/vsmagent status" as an ordinary user, the status is
incorrectly reported. The same goes for vsmserver. This is due to this code:

if kill -0 ${pid} 2>/dev/null; then
------- Comment #1 From cendio 2005-08-15 16:38:09 -------
I cannot find any obvious solution to this bug. Not important enough for 1.4.1,
retargeting. 
------- Comment #2 From cendio 2012-11-26 14:40:08 -------
*** Bug 4491 has been marked as a duplicate of this bug. ***
------- Comment #3 From cendio 2012-12-07 10:17:57 -------
Instead of kill -0 we could check for /proc/${pid} instead.
------- Comment #4 From cendio 2013-08-14 14:00:01 -------
Fixed in r27778.
------- Comment #5 From cendio 2013-10-14 12:29:41 -------
Tested:

[samuel@justina-60 ctc]$ /etc/init.d/vsmagent status
vsmagent.service - LSB: Start or stop the ThinLinc vsmagent
   Loaded: loaded (/etc/rc.d/init.d/vsmagent)
   Active: active (running) since Mon 2013-10-14 12:26:43 CEST; 8s ago
  Process: 12096 ExecStop=/etc/rc.d/init.d/vsmagent stop (code=exited,
status=0/SUCCESS)
  Process: 12124 ExecStart=/etc/rc.d/init.d/vsmagent start (code=exited,
status=0/SUCCESS)
   CGroup: name=systemd:/system/vsmagent.service
           └─12144 python-thinlinc /opt/thinlinc/sbin/vsmagent

[samuel@justina-60 ctc]$ sudo service vsmagent stop
Shutting down ThinLinc vsmagent (via systemctl)
[samuel@justina-60 ctc]$ /etc/init.d/vsmagent status
vsmagent.service - LSB: Start or stop the ThinLinc vsmagent
   Loaded: loaded (/etc/rc.d/init.d/vsmagent)
   Active: inactive (dead) since Mon 2013-10-14 12:26:57 CEST; 1s ago
  Process: 12169 ExecStop=/etc/rc.d/init.d/vsmagent stop (code=exited,
status=0/SUCCESS)
  Process: 12124 ExecStart=/etc/rc.d/init.d/vsmagent start (code=exited,
status=0/SUCCESS)

Works as intended.
------- Comment #6 From cendio 2013-10-14 14:53:57 -------
Pierre noted that this should be tested on a dist without systemd, Ubuntu for
example.
------- Comment #7 From cendio 2013-10-15 09:00:32 -------
(In reply to comment #4)
> Fixed in r27778.

This commit fixes vsmagent and vsmserver, but we have tlwebaccess and tlwebadm
as well.
------- Comment #8 From cendio 2013-10-15 13:14:53 -------
(In reply to comment #7)
> (In reply to comment #4)
> > Fixed in r27778.
> 
> This commit fixes vsmagent and vsmserver, but we have tlwebaccess and tlwebadm
> as well.

r28037.
------- Comment #9 From cendio 2013-10-17 08:32:03 -------
Verified with build 4110 that '/etc/init.d/tlwebaccess status' reported that
the service is not running.

Upgrade to build 4116 which includes the fixes and verified that both
tlwebaccess and tlwebadm reported status sucessfully.