Red Hat Bugzilla – Bug 662784
vnc servers are not killed by rc script due to bad names in /etc/init.d/vncserver
Last modified: 2013-04-30 19:48:26 EDT
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
/etc/init.d/vncserver stop is not called, and vncserver session is still alive.
/etc/init.d/vncserver stop is called and vncserver session gets killed.
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 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.
Closing because this is fixed in Fedora 15 & 16 and Fedora 17 no longer uses initscript in favor of systemd unit files.