help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DefineClasses in editfiles


From: Mohamed Eldesoky
Subject: Re: DefineClasses in editfiles
Date: Mon, 31 May 2004 10:49:23 +0300
User-agent: KMail/1.6.2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 31 May 2004 7:11 am, Steve Wray wrote:
> I need to run a shellcommand to unzip a file,
> then an editfiles to edit contents of something in that file,
> then another shellcommand to zip it up again.
>
> Like this;
>
> shellcommands:
>    Mozilla_Update::
>       "/usr/bin/unzip US.jar"
>       chdir=/usr/lib/mozilla-firefox/chrome
>       define=Mozilla_Ready_To_Edit
>
> then
>
> editfiles:
>    Mozilla_Ready_To_Edit::
>    # Having unzipped the darn thing we can now edit it
>    {
> /usr/lib/mozilla-firefox/chrome/locale/US/browser-region/region.properties
> ReplaceAll "^homePageDefault=.*mozilla.*$" With
> "homePageDefault=http://intranet"; ReplaceAll
> "^browser.startup.homepage=.*mozilla.*$" With
> "browser.startup.homepage=http://intranet"; ReplaceAll
> "^browser.throbber.url=.*mozilla.*$" With
> "browser.throbber.url=http://intranet"; ReplaceAll
> "^startup.homepage_override_url=.*mozilla.*$" With
> "startup.homepage_override_url=http://intranet"; # and once its edited we
> are ready to zip it back up:
>       DefineClasses "Mozilla_Ready_To_Zip"
>    }
>
> then
>
> shellcommands:
>    Mozilla_Ready_To_Zip::
>       "/usr/bin/zip -rm US.jar locale"
>       chdir=/usr/lib/mozilla-firefox/chrome
>
> I've tried this with the two shell commands in one shellcommands
> definition, and seperately like I show here.
>
> The control section looks like this;
>
>    actionsequence = ( shellcommands editfiles shellcommands  )

actionsequence = ( shellcommands.Mozilla_Update editfiles 
shellcommands.Mozilla_Ready_To_Zip )

Didn't try it myself, but was recommended to do so in the list before.

Regards
Mohamed Eldesoky
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAuuOF2FHsOWMJBKMRArXtAJ4oWc7Fi2JClSbu2GznFWzI67v+twCg3h/a
L6OaCAS1lTN6XoI7ndw132U=
=bmA5
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]