Skip to Content.
Sympa Menu

sm-grimoire - Re: [SM-Grimoire] Spells that edit httpd.conf

sm-grimoire AT lists.ibiblio.org

Subject: Discussion of Spells and Grimoire items

List archive

Chronological Thread  
  • From: "Eric Sandall" <eric AT sandall.us>
  • To: <sm-grimoire AT lists.ibiblio.org>
  • Subject: Re: [SM-Grimoire] Spells that edit httpd.conf
  • Date: Fri, 10 Jan 2003 15:17:32 -0800 (PST)

Pierre Abbat said:
> I'm writing a spell that adds a line to httpd.conf. Now suppose that
> there are two spells, ploni and elmoni, which both add lines to
> httpd.conf. Neither depends on the other. You cast ploni, then cast
> elmoni, then dispel ploni. What happens? What should happen?
>
> phma

For this, perhaps have the spell take a before and after "shot" of
httpd.conf, using 'diff -u', and store this information in
${SPELL_CONFIG}, perhaps (thoughts on this, anyone? Is there a better way
in sorcery to do this?). Then, in POST_REMOVE, have the spell un-apply
the diff, and it will remove the change it made (may have to turn on
mucho-fuzziness, as the user may modify the file and change the line
numbers of the change).

-One of Four
a.k.a. sandalle

--
PGP Key 0x5C8D199A5A317214
http://search.keyserver.net:11371/pks/lookup?op=get&search=0x5A317214

Eric Sandall | Source Mage GNU/Linux Developer
eric AT sandall.us | http://www.sourcemage.org/
http://www.sandall.us/~sandalle/ | SysAdmin @ Inst. Shock Physics @ WSU
http://counter.li.org/ #196285 | http://www.shock.wsu.edu/






Archive powered by MHonArc 2.6.24.

Top of Page