Subject: misc/6828: rc.shutdown error
To: None <gnats-bugs@gnats.netbsd.org>
From: None <paul@whooppee.com>
List: netbsd-bugs
Date: 01/17/1999 07:43:41
>Number:         6828
>Category:       misc
>Synopsis:       rc.shutdown error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 17 07:50:00 1999
>Last-Modified:
>Originator:     Paul Goyette
>Organization:
>Release:        Jan 17, 1999
>Environment:
System: NetBSD pc1.whooppee.com 1.3I NetBSD 1.3I (PC1) #33: Fri Nov 27 23:13:15 PST 1998 paul@pc1.whooppee.com:/home/paul/src/sys/arch/i386/compile/PC1 i386


>Description:
	rc.shutdown looks in the wrong place for file xdm-pid (it looks
	in /var/run/, but xdm puts its file in /usr/X11R6/lib/X11/xdm/).

	If you fix that, then the "kill -0" statement displays an
	error message when the xdm process exits.  Although the
	message doesn't really hurt anything, it messes up the
	printout from rc.shutdown
>How-To-Repeat:
	Just run rc.shutdown
>Fix:
	Apply following patch to rc.shutdown:

*** /usr/src/etc/rc.shutdown	Fri Oct 30 04:04:59 1998
--- rc.shutdown Sun Jan 17 07:27:38 1999
***************
*** 32,42 ****
  
  # Kill xdm and wait for it to terminate.
  if checkyesno xdm; then
!	XDM_PID=`sed 1q /var/run/xdm-pid`
  	if [ -n "$XDM_PID" ]; then
  		echo -n ' xdm'
  		kill $XDM_PID
! 		while kill -0 $XDM_PID; do
  			sleep 1
  		done
  	fi
--- 32,42 ----
  
  # Kill xdm and wait for it to terminate.
  if checkyesno xdm; then
! 	XDM_PID=`sed 1q /usr/X11R6/lib/X11/xdm/xdm-pid`
  	if [ -n "$XDM_PID" ]; then
  		echo -n ' xdm'
  		kill $XDM_PID
! 		while kill -0 $XDM_PID 2> /dev/null; do
!			echo -n "."
  			sleep 1
  		done
  	fi
>Audit-Trail:
>Unformatted: