[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Cfengine] shellcommands: 3: Bad file descriptor]
From: |
Russell Adams |
Subject: |
Re: [Cfengine] shellcommands: 3: Bad file descriptor] |
Date: |
Fri, 16 Sep 2005 14:34:26 -0500 |
User-agent: |
Mutt/1.4.2.1i |
Here's how I configure APT to allow automated installation.
First, remove /etc/apt/apt.conf.d/70debconf.
Then create /etc/dpkg/dpkg.cfg:
BeginReplacementEdit(`/etc/dpkg/dpkg.cfg',`DpkgCfg')
Append "force-confold"
Append "force-confdef"
EndReplacementEdit()
Next setup a new item, /etc/apt/apt.conf.d/10cfengine:
m4_define(`EditorCommentString',`//')
BeginReplacementEdit(`/etc/apt/apt.conf.d/10cfengine',`AptConfCFEngine')
Append "APT {"
Append " Get {"
Append " Assume-Yes \"true\";"
Append " Fix-Missing \"yes\";"
Append " Show-Upgraded \"yes\";"
Append " Purge \"true\";"
Append " List-Cleanup \"true\";"
Append " ReInstall \"false\";"
Append " };"
Append "};"
Append ""
Append "DPkg::Pre-Install-Pkgs {"
Append " \"dpkg-preconfigure --apt --frontend=noninteractive\";"
Append "};"
EndReplacementEdit()
m4_define(`EditorCommentString',`#####')
Then call APT to install:
"DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get install package"
Ignore the m4 editfiles macros, you should get the idea and be able to
copy/paste the Append lines.
I got most of this from a prior post, seen here:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&threadm=mailman.1479.1065791230.21628.help-cfengine%40gnu.org&rnum=2&prev=/groups%3Fq%3Ddpkg%2Bcfengine%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3Dutf-8%26selm%3Dmailman.1479.1065791230.21628.help-cfengine%2540gnu.org%26rnum%3D2
Russell
On Fri, Sep 16, 2005 at 03:01:03PM +0200, Bas van der Vlies wrote:
> Michael Chesterton wrote:
> >Hello,
> >
> >I'm trying to install a deb package through shellcommands:
> >
> >the apt-get install command is dying with
> >
> >/var/lib/dpkg/info/nullmailer.postinst: line 31: 3: Bad file descriptor
> >
> >line 31 is a debconf function which does
> >
> >echo STOP >&3
> >
> >above that is
> >
> >exec 3>&1 1>&2
> >
> >I'm completely lost, any ideas?
> >
> >What's also confusing me is
> >
> >echo "$@" >&3
> >
> >is run multiple times before the echo STOP with no error message.
> >
> >
> Which version do you use?
>
> I am using the following setup:
> debconf (non-interactive) dpkg-reconfigure -f dialog -p medium debconf
>
> Upgrade_debian script:
> =================================================
> #!/bin/sh
> export DEBIAN_FRONTEND="noninteractive"
>
> apt-get update
> apt-get -y upgrade
> apt-get clean
>
>
> --
> ********************************************************************
> * *
> * Bas van der Vlies e-mail: basv@sara.nl *
> * SARA - Academic Computing Services phone: +31 20 592 8012 *
> * Kruislaan 415 fax: +31 20 6683167 *
> * 1098 SJ Amsterdam *
> * *
> ********************************************************************
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
>
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
pgpMZDIrbXRb9.pgp
Description: PGP signature