[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debian package management with cfengine
From: |
Yaroslav Halchenko |
Subject: |
Re: Debian package management with cfengine |
Date: |
Mon, 21 Mar 2005 12:11:22 -0500 |
User-agent: |
Mutt/1.5.6+20040907i |
Nice. Thanx
I'm not trying to don't use debconf at all because I'm afraid it might
leave some packages in unusable state. I rather copy its
parameters from the server where I run installation manually, ie
providing answers to the questions in interactive mode.
Then in cfengine on the nodes I
copy:
/var/cache/debconf/config.dat dest=/var/cache/debconf/config.dat.main
mode=400 server=$(etcserver)
editfiles:
{ /etc/debconf.conf
LocateLineMatching "Config: configdb.*"
IncrementPointer "2"
BeginGroupIfNoMatch "Frontend: .*"
IncrementPointer "-1"
InsertLine "Frontend: noninteractive"
EndGroup
LocateLineMatching ".*/var/cache/debconf/config.dat.*"
IncrementPointer "2"
BeginGroupIfNoMatch "# cfengine2 - 110603.*"
IncrementPointer "-2"
InsertLine ""
InsertLine "# cfengine2 - 110603 yoh@ fallback database from ravana"
InsertLine "Name: configravana"
InsertLine "Driver: File"
InsertLine "Mode: 400"
InsertLine "Backup: false"
InsertLine "Required: false"
InsertLine "Readonly: true"
InsertLine "Filename: /var/cache/debconf/config.dat.main"
DefineInGroup "AddedDebconf"
EndGroup
LocateLineMatching "Stack: config.*"
AppendToLineIfNotContains ", configravana"
}
This way is not perfect but it might reduce required configuration for
many packages.
On Mon, Mar 21, 2005 at 10:24:28AM -0600, Brendan Strejcek wrote:
> Moritz Bunkus wrote:
> > This did work rather well with joe, but I ran into some problems with
> > another package and its config files. Therefore I'd like some input on
> > how you are doing package management.
> A large effort is needed to actually make Debian packages install
> noninteractively. DEBIAN_FRONTEND=noninteractive is not enough.
> I also use these apt options:
> DPkg::Options {"--force-confold";};
> (That is the contents of my /etc/apt/apt.conf.d/30dpkg_force_confold.)
> This is important if, for example, you are upgrading a package and a
> config file has been modified. Even if DEBIAN_FRONTEND=noninteractive
> has been set, it will wait for admin input unless you specify
> --force-confold or --force-confnew.
> I try to deactivate debconf as much as possible, as I use centralized
> means to configure software. For example, I comment out this line from
> the apt config (which is default, I think):
> //DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
> You can also configure some behavior in /etc/debconf.conf. I like:
> Frontend: noninteractive
> Admin-Email:
> Setting Admin-Email to the empty string makes it so debconf does not
> mail lots of annoying (and useless) info when running in noninteractive
> mode.
> I still have not found a nice way to wrap dpkg due to the ridiculous
> number of states a package can be in.
> -- Brendan
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
--
Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Office: (973) 353-5440x263 | FWD: 82823 | Fax: (973) 353-1171
Student Ph.D. @ CS Dept. NJIT, Master @ CS Dept. UNM