Chapter 10. Files
82
The distinction between these two is important; they are not interchangeable concepts. Almost
all
conffile
s are configuration files, but many configuration files are not
conffiles
.
Note that a script that embeds configuration information (such as most of the files in
/etc
/default
and
/etc/cron.{daily,weekly,monthly}
) is de facto a configuration file and
should be treated as such.
10.7.2 Location
Any configuration files created or used by your package must reside in
/etc
. If there are
several, consider creating a subdirectory of
/etc
named after your package.
If your package creates or uses configuration files outside of
/etc
, and it is not feasible to
modify the package to use
/etc
directly, put the files in
/etc
and create symbolic links to
those files from the location that the package requires.
10.7.3 Behavior
Configuration file handling must conform to the following behavior:
  local changes must be preserved during a package upgrade, and
  configuration files must be preserved when the package is removed, and only deleted
when the package is purged.
The easy way to achieve this behavior is to make the configuration file a
conffile
. This
is appropriate only if it is possible to distribute a default version that will work for most in 
stallations, although some system administrators may choose to modify it. This implies that
the default version will be part of the package distribution, and must not be modified by the
maintainer scripts during installation (or at any other time).
In order to ensure that local changes are preserved correctly, no package may contain or make
hard links to conffiles.
6
The other way to do it is via the maintainer scripts. In this case, the configuration file must
not be listed as a
conffile
and must not be part of the package distribution. If the existence
of a file is required for the package to be sensibly configured it is the responsibility of the
package maintainer to provide maintainer scripts which correctly create, update and maintain
the file and remove it on purge. (See `Package maintainer scripts and installation procedure' on
page
39
for more information.) These scripts must be idempotent (i.e., must work correctly if
dpkg
needs to re run them due to errors during installation or removal), must cope with all the
variety of ways
dpkg
can call maintainer scripts, must not overwrite or otherwise mangle the
user's configuration without asking, must not ask unnecessary questions (particularly during
upgrades), and otherwise be good citizens.
6
Rationale: There are two problems with hard links. The first is that some editors break the link while editing
one of the files, so that the two files may unwittingly become unlinked and different. The second is that
dpkg
might
break the hard link while upgrading
conffile
s.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

gay web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved