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
I cannot find any obvious solution to this bug. Not important enough for 1.4.1, retargeting.
*** Bug 4491 has been marked as a duplicate of this bug. ***
Instead of kill -0 we could check for /proc/${pid} instead.
Fixed in r27778.
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.
Pierre noted that this should be tested on a dist without systemd, Ubuntu for example.
(In reply to comment #4) > Fixed in r27778. This commit fixes vsmagent and vsmserver, but we have tlwebaccess and tlwebadm as well.
(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.
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.