The fact that you're using apt-get, suggests that you've created a DEB package. Have you read the
Debian Polcy Manual thoroughly?
While I've created quite a few packages for my personal use, I've never had the cause to use this.
From Chapter 6 of the manual:
Quote:
Debian Policy Manual
Chapter 6 - Package maintainer scripts and installation procedure
6.1 Introduction to package maintainer scripts
It is possible to supply scripts as part of a package which the package management system will run for you when your package is installed, upgraded or removed.
These scripts are the control information files preinst, postinst, prerm and postrm. They must be proper executable files;
......
6.7 Details of configuration
When we configure a package (this happens with dpkg --install and dpkg --configure), we first update any conffiles and then call:
postinst configure most-recently-configured-version No attempt is made to unwind after errors during configuration. If the configuration fails, the package is in a "Failed Config" state, and an error message is generated.
|
You can install the
debian-policy package for a local copy of the manual, or view the lastest version on-line at:
http://www.debian.org/doc/debian-policy/.
Hope this helps.