Linux Archive

Linux Archive (
-   Debian User (
-   -   configuring packages from script (

Bob Proulx 12-23-2010 05:04 PM

configuring packages from script
George Shuklin wrote:
> Now I need to do same thing from script. I know I can change
> configuration file directly, but will it right solution?
> Is any way to supply replies to debconf during some package
> reconfiguration?

There are several ways. I like setting the EDITOR variable to a perl
script that will make the changes I desire and then select the editor
frontend for the task.

For example, the following configures the default paper size in
libpaper to be a US-centric "letter" default instead of "a4".

# With the frontend set to editor we get a file and we only need to
# change the value on the line from yes to no.
EDITOR='perl -pi -e "s@libpaper/defaultpaper=.*@libpaper/defaultpaper="'"letter"'"@"'
dpkg-reconfigure --frontend=editor libpaper1

You may want to set
to avoid any email, if email were to be sent.


All times are GMT. The time now is 01:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.