[19527] in Athena Bugs

home help back first fref pref prev next nref lref last post

sun4 9.0.13: rc3

daemon@ATHENA.MIT.EDU (Jacob Morzinski)
Thu Aug 2 19:14:34 2001

Message-Id: <200108022314.TAA00730@m66-080-11.mit.edu>
To: bugs@MIT.EDU
Date: Thu, 02 Aug 2001 19:14:31 -0400
From: "Jacob Morzinski" <jmorzins@MIT.EDU>

System name:		m66-080-11.mit.edu
Type and version:	Ultra-5_10 9.0.13
Display type:		m

Shell:			/bin/athena/tcsh
Window manager:		unknown

What were you trying to do?
	While watching a Sun reboot, I noticed the warning
	 "rc3: test: argument expected"
	appear on the screen just before X was started.

	Investigation reveals that the error message is caused
	by line 54 of /etc/rc3.

What's wrong:
	Trivially, /etc/rc3 fails to quote arguments that it passes to
	test.  Less trivially, /etc/rc3 expects that it can use "who -r"
	to learn the run-level of the init process, but in fact	"who -r"
	sometimes returns no output.

	"Sometimes"?  Yes, "sometimes".  Consider the following:

m66-080-11.mit.edu# who -r
m66-080-11.mit.edu# telinit 2
m66-080-11.mit.edu# telinit 3
m66-080-11.mit.edu# who -r
   .       run-level 3  Aug  2 19:01     3      1  2
m66-080-11.mit.edu# 

	If someone can explain that to me, it should be easy to fix
	the /etc/rc3 script.

What should have happened:
	Script authors should always quote variable names,
	and the "who" program should have less hidden state.

Please describe any relevant documentation references:
	-


 -Jacob

home help back first fref pref prev next nref lref last post