[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how best to do package management?
From: |
Brian Youngstrom |
Subject: |
Re: how best to do package management? |
Date: |
Wed, 12 Feb 2003 10:59:26 -0800 |
* Pur A. Lux <puralux@yahoo.com> [030212 10:06]:
> What techniques have people used to do this
> within cfengine?
Here is what I currently use:
-----
classes:
HasSYSSTAT = ( FileExists(/usr/bin/sar) )
HasUP2DATE = ( FileExists(/usr/sbin/up2date) )
[...]
shellcommands:
redhat.!HasSYSSTAT::
"/bin/rpm -U http://hagrid/rpms/sysstat-4.0.5-1.i386.rpm"
useshell=false
timeout=60
HasUP2DATE::
'/bin/rpm -e up2date'
useshell=false
timeout=10
-----
The FileExists checks look for a file that is included in a particuar
package that I care to watch for. Then I either install or remove the
package depending on which package is present.
I have a script that checks for updates daily, so I don't check for a
version specific file here. I just have to remember to update the rpm
-i line when I have a new rpm. :)
One could use a module to define classes for each rpm installed, then
have appropriate shellcommands to install/remove as you wish.
--
Brian Youngstrom
byoung@cs.washington.edu
University of Washington
Computer Science & Engineering