Bug 662784 - vnc servers are not killed by rc script due to bad names in /etc/init.d/vncserver
Summary: vnc servers are not killed by rc script due to bad names in /etc/init.d/vncse...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: tigervnc
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-13 20:49 UTC by Ling Li
Modified: 2013-04-30 23:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-22 09:33:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ling Li 2010-12-13 20:49:40 UTC
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 14:15:49 UTC
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 09:33:56 UTC
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.