[comp.sys.apollo] Bugs in SR10.2 rc files

kint@software.org (Rick Kint) (12/19/89)

	We just brought up our first few SR10.2 systems, and so far are happy
with it.  We had a couple of problems with rc files I'd like to pass on.

	If you uncomment the commands to start prmgr and/or prsvr in rc.user
(/etc/rc.user, a link to `node_data/etc/rc.user), the commands may not start,
commands after them in rc.user may not start, and the "Starting Windows"
message from init may appear on the same line as the "Starting Other Daemons"
message instead of on the next line (this is a sign that rc.user did not fully
execute, since its last act is to echo a period and a newline to /dev/console).

	The first error is on the following line (line 76 in the stock rc.user)

		if [ -f /sys/hardcopy/prsvr -a $LLBD_ENABLED = true]; then

	The Bourne shell uses spaces to delimit tokens and considers "true]"
to be a single token.  This causes test to exit with an error, which causes
rc.user to abort.  Putting a space in fixes this:

		if [ -f /sys/hardcopy/prsvr -a $LLBD_ENABLED = true ]; then

	The other problem is more subtle.  The prmgr and the prsvr both test
the value of the shell variable LLBD_ENABLED.  This variable is set in /etc/rc
(a link to `node_data/etc/rc).  Unfortunately, shell variables are not
automatically exported to child processes;  LLBD_ENABLED is not exported to
rc.user by rc, so LLBD_ENABLED is evaluated as a null string.  Thus the line
above is interpreted as 

		if [ -f /sys/hardcopy/prsvr -a = true]; then

	The '=' operator is a binary infix operator which needs a string on
both sides.  This not being the case, test exits and causes rc.user to exit.
Add the following line to /etc/rc to export the variable:

		export LLBD_ENABLED

--
Rick Kint                          CSNET:   kint@software.org
Software Productivity Consortium   ARPANET: kint%software.org@relay.cs.net   
Herndon, VA                        UUNET:   ...!uunet!sunny!kint