[3052] in SIPB_Linux_Development

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

Re: Post install script

daemon@ATHENA.MIT.EDU (Derek Atkins)
Fri Oct 6 16:50:01 2000

To: Jonathon Weiss <jweiss@MIT.EDU>
Cc: Alex Coventry <alex_c@MIT.EDU>, Linux-Dev <linux-dev@MIT.EDU>
From: Derek Atkins <warlord@MIT.EDU>
Date: 06 Oct 2000 16:49:52 -0400
In-Reply-To: Jonathon Weiss's message of "Fri, 6 Oct 2000 16:16:12 -0400 (EDT)"
Message-Id: <sjmpuldy9sf.fsf@rcn.ihtfp.org>

Jonathon Weiss <jweiss@MIT.EDU> writes:

> alex_c>$ROOT/bin/sed	-e "s/localhost.localdomain/$HOSTNAME/" \
> alex_c>		-e "s/PUBLIC=false/PUBLIC=false/"  \
> alex_c>		-e "s/ADDR=/ADDR=$ADDR/" \
> alex_c>		-e "s/HOST=/HOST=$HOSTNAME/" \
> alex_c>		-e "s/MACHINE=i[3456]86/MACHINE=$MACHINE/"  \
> alex_c>		$ROOT/etc/athena/rc.conf > /tmp/rc.conf
> 
> Having the 1st and 4th lines written the way they are seems dangerous.
> Perhaps the 3rd and 4th linse should onlt do the substitution if the
> variables are empty.

I'm not convinced that the 1st line is dangerous.  Why do you think
so?  I agree with your assessment of the 3rd and 4th lines.  I would
recommend something like:
	s/ADDR=(\s+)/ADDR=$ADDR\1/
	s/HOST=(\s+)/HOST=$HOSTNAME\1/

Granted, this will fail if you have something like "ADDR = a.b.c.d",
but I don't think this is legal syntax anyways.

> warlord>   PS: Why is AFSCLIENT added by the post-install instead of put in by
> warlord>   athena-base?  Perhaps this is a question for 'bugs'?
> 
> Actually looking at the spec file, I have every reason to beleive that
> the post-install part of the athean-afs package is adding these.  If
> not that is a bug.  Either way if the SIPB post-install is going to
> add them, it needs to make sure to do so only if they aren't already
> in the file.

Hrm.  Then I wonder why a LOT of people have had problems with rc.conf
not having AFSCLIENT=true in it.  I wonder if this is an artifact of them
doing something like:

	install athena-afs
		(side effect: creates an unconnected rc.conf with AFSCLIENT)
	install athena-base
		(side effect: saves rc.conf without AFSCLIENT)

If this is happening, it might be a good idea for athena-afs to
trigger off of athena-base to make sure AFSCLIENT is added to rc.conf
if it doesn't exist.

Comments?

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/      PP-ASEL      N1NWH
       warlord@MIT.EDU                        PGP key available

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