[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: extract debian package default config



Hi Jeffrey,

Jeffrey Cao a écrit :
Is there a simple way to get back the original package defauft config?

Example: I would like to get the original packaged apache2.conf

Is there some command which extract this from the package or is it 
extracted somewhere?
      
Normally, there's a backup configure file somewhere.
Use "dpkg -L packge" to check.
  
Hum, nope it doesn't works

dpkg -L apache2.2-common |grep apache2\\.conf
/etc/apache2/apache2.conf
/usr/share/doc/apache2.2-common/examples/apache2/apache2.conf.gz


zcat /usr/share/doc/apache2.2-common/examples/apache2/apache2.conf.gz | diff -q /etc/apache2/apache2.conf -
Files /etc/apache2/apache2.conf and - differ

For PierPaolo suggestion :

dpkg --reconfigure apache2.2-common
dpkg: unknown option --reconfigure

       --configure package...|-a|--pending
              Reconfigure an unpacked package. If -a or --pending is given instead of package, all unpacked  but
              unconfigured packages are configured.

              Configuring consists of the following steps:
              1. Unpack the configuration files, and at the same time back up the old configuration files, so that they can be
              restored if something goes wrong.

              2. Run postinst script, if provided by the package.


Not that way, still searching...

dpkg --force-confnew --configure apache2.2-common
dpkg: error processing apache2.2-common (--configure):
 package apache2.2-common is already installed and configured
Errors were encountered while processing:
 apache2.2-common

Thanks for your suggestions.

Regards,
Sylvain.

Reply to: