FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 12-23-2010, 05:04 PM
Bob Proulx
 
Default 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
export DEBCONF_ADMIN_EMAIL=""
to avoid any email, if email were to be sent.

Bob
 

Thread Tools




All times are GMT. The time now is 05:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org