Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3200

Installation • Request for clarification on apt.conf

$
0
0
There is a requirement that prior to installation or update or un-installation of any package a shell script should be run. After apt downloads the package from the FTP or Repositories this shell script has to be executed. And after installation, i.e. the package has been configured, then a different shell script will be executed.

So while going through the documentation of apt.conf and a few links I came across a few configuration items like DPkg::Post-Invoke, DPkg::Pre-Invoke and others. So what I was going to do is create a configuration file with the following statement

Code:

DPkg::Pre-Install-Pkgs { "/exec/customPreScript.sh"; };APT::Update::Pre-Invoke  {"/exec/customPreScript.sh";};APT::Update::Post-Invoke {"/exec/customPostScript.sh"; };DPkg::Post-Invoke {"/exec/customPostScript.sh"; };
For this I have some doubts. They are

1) Does APT use DPKG under the hood. So whenever we install or upgrade or uninstall using APT, DPKG will be called to do the actual installation or up-gradation or un-installation?
2) Will the commands in the shell script file be executed with root level privileges?
3) The documentation says that we have to put our configuration files in /etc/apt/apt.conf.d. Is that correct? Or can we modify the /etc/apt/apt.conf.
4) Will these configuration be processed, i.e. shell script be executed, even if I use APT, DPKG, APTITUDE and Synaptic Package manager?
5) Will the DPkg::Post-Invoke and/or APT::Update::Post-Invoke be executed after the package has been installed and configured?
6) Will all the above 4 examples given above work for installation or update or un-installation?

Statistics: Posted by DebianFox — 2024-06-13 15:23 — Replies 1 — Views 37



Viewing all articles
Browse latest Browse all 3200

Trending Articles