Re: Compiling while mud is up.

From: George (gagreer@dragon.ham.muohio.edu)
Date: 05/28/96


> > 1) Edit your Makefile, so that it makes bin/circle1 instead of bin/circle.
> > That way it actually writes to a file other than bin/circle when it
> > compiles.  Just basically scan through your Makefile and look for any
> > instance of bin/circle and replace it with bin/circle1... no biggie.

Much easier to just rename your main file to circle5 for example and then
change one line in your autorun file.

> > 2)  Edit the autorun script so that every time the mud is rebooted (either
> > from a crash or from a 'shutdown reboot'), it renames the new version
> > (circle1) to circle and then boots the mud.  I also have it make a backup
> > copy of my previous version, just in case I need to fall back...  Here is
> > what I added to the autorun script; put these lines somewhere right before
> > it launches the mud (the 'bin/circle $FLAGS $PORT >> syslog 2>&1' line ).
> > 
> > cp bin/circle bin/circle.backup     <-- Here I backup my previous version...
> > mv bin/circle1 bin/circle              <-- And now move any new version (if
> > there is one) to bin/circle...

Erm, one possible problem there is what if the mud reboots after you have
been writing a bunch of code for something that say, needs a pfile wipe,
suddenly your code (which is probably just a small test version of the
actual end product) is thrust into running for real, eradicating your pfile.
There are other problems with that, a warning during compile in comm.c that
makes the mud crash when you connect and yet the binary file is linked, etc

Another idea in lieu of that is this:
- Go edit your do_shutdown code in act.wizard.c, adding a "new" clause.
  This "new" clause will create a file in your circle directory and shutdown
  the mud, the autorun checks for this file and copies the new mud version
  in, removing the temp file of course.

autorun example:
  if (-r .copyme) then
    rm .copyme
    mv bin/circle.run bin/circle.bak
    mv bin/circle bin/circle.run
  endif



This archive was generated by hypermail 2b30 : 12/18/00 PST