[Rpcemu] RPCEmu 0.8.7
Jeremy Nicoll - ml roinfo
jn.ml.roi.39 at wingsandbeaks.org.uk
Sun Sep 5 11:38:53 PDT 2010
Dave Symes <dave at triffid.co.uk> wrote:
> While I'm awaiting some comment from the Select mailing list, I've done a
> very nasty hack that gets networking running on Select RO 4.39
Nasty is right. Although you've explained the changes you've not explained
what they achieve.
If I were going to make a series of changes to Obey files, like this, I'd
probably make them conditional on some external condition.
For example on my old RPC I had quite a few parts of the boot sequence that
only ran sometimes, eg sometimes I wanted !MultiDriv to run.
I created a small text file called !MULT_NO in the same directory as I
stored the !MultiDriv app - the text file's name started with an "!" just so
that the filer sorted the app and text file adjacently. I also created an
Obey file called !Mult_FLIP containing:
| Flagfiles are !Mult_NO and !Mult_YES. Either one, or neither, or both may
Set JN$MultFlagN 0
Set JN$MultFlagY 0
IfThere <JN$Utilities>.DisksFiles.!Mult_NO Then Set JN$MultFlagN 1
IfThere <JN$Utilities>.DisksFiles.!Mult_YES Then Set JN$MultFlagY 1
If "<JN$MultFlagN><JN$MultFlagY>" = "00" Then Error Flip expects just one
of !Mult_NO and !Mult_YES to exist.
If "<JN$MultFlagN><JN$MultFlagY>" = "11" Then Error Flip expects just one
of !Mult_NO and !Mult_YES to exist.
If "<JN$MultFlagN><JN$MultFlagY>" = "10" Then Rename
If "<JN$MultFlagN><JN$MultFlagY>" = "01" Then Rename
Running the !Mult_FLIP Obey file would simply flip the name of the !MULT_NO
file to !Mult_YES or vice versa, having checked that just one of the
expected flag files already existed.
Elsewhere in the system instead of eg commenting out lines in Obey files,
I'd make code that tested whether or not the
<JN$Utilities>.DisksFiles.!Mult_NO or <JN$Utilities>.DisksFiles.!Mult_YES
file existed, ie have lines that instead of being
*IfThere <JN$Utilities>.DisksFiles.!Mult_YES Then Blah blah
The advantages of this are that sets of complicated changes across multiple
Obey files can all easily be related to one reason. You can find the
changes subsequently by searching, eg with !Locate, for lines which contain
the names of relevant flag files. And perhaps best of all, when !Reporter
was (as it always was) logging what was going on as the machine booted,
commands that did or did not get executed were clearly shown in the log as
dependent on the state of a sensibly-named flag.
> Finally, don't do a Boot-Configure-Networking again, otherwise you'll be
> back where you started.
One of my changes had a similar problem... I used to use the ANT Suite;
inside one of the files it used to start up, there was a Filer_Run command
for something. If at the instant that was executed I happened to have Shift
pressed (perhaps while editing something else - my boot sequence used to run
a whole set of diagnostics and generate textual reports and it was quite
likely I'd have Shift pressed while booting was still ongoing) the file
concerned didn't get run.
I changed the line from Filer_Run <whatever> to WimpTask Run <whatever>
But if I ever ran the Suite's config utility it rewrote the file with the
original Filer_Run command in it. I fixed this by changing the Obey file
which ran the Suite's config tool, to run a small program which would whiz
through the newly created file changing any/all Filer_Run commands it found
back to Wimptask Run commands.
You may need to do something similar; an alternative is to make it
impossible to enter the Boot-Configure-Networking dialog by accident.
Jeremy C B Nicoll - my opinions are my own.
More information about the Rpcemu