Bug 662784 - vnc servers are not killed by rc script due to bad names in /etc/init.d/vncserver
vnc servers are not killed by rc script due to bad names in /etc/init.d/vncse...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: tigervnc (Show other bugs)
14
All Linux
low Severity medium
: ---
: ---
Assigned To: Adam Tkac
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-13 15:49 EST by Ling Li
Modified: 2013-04-30 19:48 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-22 05:33:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ling Li 2010-12-13 15:49:40 EST
Description of problem:
The rc script (/etc/rc.d/rc) doesn't run "K35vncserver stop" on poweroff (or any initlevel changes), even though a session is up (via 'server vncserver start').  This prevents my computer to fully shutdown (can't unmount /dev/pts) (which uses autofs/nfs for the home directories, if that matters).

How reproducible:  Always.

Steps to Reproduce (as root):
1. chkconfig --level 35 vncserver on
2. edit /etc/sysconfig/vncservers to add a session
3. service vncserver start
4. init 1
  
Actual results:
/etc/init.d/vncserver stop is not called, and vncserver session is still alive.

Expected results:
/etc/init.d/vncserver stop is called and vncserver session gets killed.

Additional info:
I believe the problem is in the script /etc/init.d/vncserver.  It touches /var/lock/subsys/Xvnc on start and deletes it on stop.  /etc/rc.d/rc looks for another file, /var/lock/subsys/vncserver, to decide whether the vncserver service should be killed.  Since rc can't find /var/lock/subsys/vncserver, it assumes the service isn't up so it doesn't kill it.

So one solution could be to replace '/var/lock/subsys/Xvnc' (4 appearances) to '/var/lock/subsys/vncserver' in /etc/init.d/vncserver.  This works for me on Fedora 14.

Thanks.
Comment 1 Ling Li 2011-05-13 10:15:49 EDT
Thanks for fixing this in Fedora 15 and the rawhide.  Fedora 14 still have the old version (1.0.90-0.25 vs 1.0.90-0.26 where this was fixed), but that's fine with me since I can just upgrade to the FC15 package.
Comment 2 Adam Tkac 2012-05-22 05:33:56 EDT
Closing because this is fixed in Fedora 15 & 16 and Fedora 17 no longer uses initscript in favor of systemd unit files.

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