Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Improved API for query and store config information

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Eric Sandall <eric AT sandall.us>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Improved API for query and store config information
  • Date: Mon, 22 Mar 2004 08:33:08 -0800

Quoting Vladimír Marek <vlmarek AT volny.cz>:
> Thank you all for your response, I made the best of them (I hope) and
> commited the changes to devel sorcery. The most notable change is that
> you have to use 'persistent_load' function on the start of CONFIGURE and
> all scripts using $SPELL_CONFIG, and 'persistent_save' at the end. They
> handles the asctula serialization of the variables.
>
> Example:
>
> * CONFIGURE:
>
> persistent_load
>
> FQDN=`hostname`
> if ! config_query CONFIG "Should I use qmail to decide about your FQDN ?" y
> then
> config_query_string FQDN "Please give me your FQDN hostname" "$FQDN"
> fi
> persistent_save
>
> * POST_INSTALL:
>
> persistent_load
> if [ "$CONFIG" == "y" ]; then
> ^^^^^^^
> # Variable config 'automagically' set from CONFIGURE
>
> cd "$SOURCE_DIRECTORY/$SPELL-$VERSION"
> ./config
> fi
>
>
> When no new functions are used, it should not affect cast system in any
> way.
>
> Who will be first one to use it ? :)

Couldn't Sorcery automatically run those before/after the scripts?

-sandalle

--
PGP Key Fingerprint: FCFF 26A1 BE21 08F4 BB91 FAED 1D7B 7D74 A8EF DD61
http://search.keyserver.net:11371/pks/lookup?op=get&search=0xA8EFDD61

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/E/IT$ d-- s++:+>: a-- C++(+++) BL++++VIS>$ P+(++) L+++ E-(---) W++ N+@ o?
K? w++++>-- O M-@ V-- PS+(+++) PE(-) Y++(+) PGP++(+) t+() 5++ X(+) R+(++)
tv(--)b++(+++) DI+@ D++(+++) G>+++ e>+++ h---(++) r++ y+
------END GEEK CODE BLOCK------

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

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




Archive powered by MHonArc 2.6.24.

Top of Page