9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Machine-specific cpurc customisation?
@ 2003-10-15  7:14 Adrian Tritschler
  2003-10-15  9:51 ` Fco.J.Ballesteros
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Tritschler @ 2003-10-15  7:14 UTC (permalink / raw)
  To: 9fans

I was looking at the way I've set up my *enormous* (two PC) plan9 
network and thinking about adding changes to /rc/bin/cpurc. Since termrc 
includes termrc.local (if it exists), should cpurc include cpurc.local?

This would make it possible to have things like:

/rc/bin/cpurc

|...
|if (test -e /rc/bin/cpurc.local)
|	. /rc/bin/cpurc.local
|...

/rc/bin/cpurc.local

|...
|#global site-specific stuff, eg
|facedom=microsoft.con
|if (test -e /rc/bin/cpurc.$sysname)
|	. /rc/bin/cpurc.$sysname
|...

/rc/bin/cpurc.machine1

|# Machine-specific items for CPU/Auth machine "machine1"
|# for example
|auth/secstored >> /sys/log/secstored >[2=1] &
|#

The only problem I can see so far is that termrc.local is called before 
$sysname is available, but initialising the network in termrc.local 
should solve that.

If not, what other suggestions would people make on machine-specific 
configs, given that I'd like to be able to keep doing replica/pull from 
sources to stay up to date.

thanks,
	Adrian

---------------------------------------------------------------
Adrian Tritschler                          mailto:ajft@ajft.org
Latitude 38°S, Longitude 145°E, Altitude 50m,      Shoe size 44
---------------------------------------------------------------




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] Machine-specific cpurc customisation?
  2003-10-15  7:14 [9fans] Machine-specific cpurc customisation? Adrian Tritschler
@ 2003-10-15  9:51 ` Fco.J.Ballesteros
  2003-10-15 10:13   ` Charles Forsyth
  0 siblings, 1 reply; 3+ messages in thread
From: Fco.J.Ballesteros @ 2003-10-15  9:51 UTC (permalink / raw)
  To: 9fans

We ended up with machine specific config to be run
before most of /rc/bin/*rc in some cases, and after
most of /rc/bin/*rc in other cases, sic.

The config to be run before is for those machines where
we need specific ipconfig lines, and the one to be run after
is for those machines where particular programs should run
after all of cpurc, sic.

What about doing something like this?

/sys/lib/sys/config/machine/rc:
	fn before() { blah blah }
	fn after() { blah blah }

/rc/bin/termrc
	test -e /env/fn#before && before
	blah blah
	test -e /env/fn#after && after

I just don't know of a cleaner solution, and, as probably
happen to you, I'm scared of facing toward the atrocity of
sys-v rc scripts.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] Machine-specific cpurc customisation?
  2003-10-15  9:51 ` Fco.J.Ballesteros
@ 2003-10-15 10:13   ` Charles Forsyth
  0 siblings, 0 replies; 3+ messages in thread
From: Charles Forsyth @ 2003-10-15 10:13 UTC (permalink / raw)
  To: 9fans

i use a case on sysname in cpurc and compare updates on sources as they rarely occur.
i find it's easier to have everything in one file not scattered across
several. (the largest cpurc i've used had 13 cases with 5 architectures.)
default case * gives a `normal' general-purpose cpu server.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-15 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15  7:14 [9fans] Machine-specific cpurc customisation? Adrian Tritschler
2003-10-15  9:51 ` Fco.J.Ballesteros
2003-10-15 10:13   ` Charles Forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).