Bug 55686 - stop of service fails
Summary: stop of service fails
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vnc
Version: 7.2
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2001-11-04 22:47 UTC by Itai Nahshon
Modified: 2005-10-31 22:00 UTC (History)
0 users

Clone Of:
Last Closed: 2001-11-05 14:21:24 UTC

Attachments (Terms of Use)

Description Itai Nahshon 2001-11-04 22:47:57 UTC
Description of Problem:
stop of vnc service fails if vnc users (defined in
/etc/sysconfig/vncservers) use other shells (eg. tcsh).

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1.create user with default shell = /bin/tcsh
2.create vnc account for this user (in /etc/sysconfig/vncservers).
3.set vnc password for user.
4.run "/etc/rc.d/init.d/vncserver start"
5.run "/etc/rc.d/init.d/vncserver stop"

Actual Results:
Shutting down VNC server: 10:itai Ambiguous output redirect.

Expected Results:
Shutting down VNC server: 10:itai [  OK  ]

Additional Information:
This is because in /etc/rc.d/init.d/vncserver
(line 46)
"su ${display##*:} -c \"vncserver -kill :${display%%:*} >/dev/null 2>&1\""

The redirect to /dev/null is done on the user's shell. That's OK
if the user is using bask (or sh or ksh) but wrong for users that
run tcsh.

Easy workaround:
Change above line to:
"su ${display##*:} -c \"vncserver -kill :${display%%:*}\" >/dev/null 2>&1"
(that will take the redirection out of the arg to su -c. The redirection 
will be done on the caller's shell which is /bin/bash).

Comment 1 Tim Waugh 2001-11-05 14:13:25 UTC
You're right.  Thanks for the report.  I'm building a fixed package.

Comment 2 Tim Waugh 2001-11-07 09:47:51 UTC
Fixed in 3.3.3r2-22.

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