Hallo Олег Михайлов, 16.08.23 16:38 Олег Михайлов: > I want to create a package, which acts in the following manner: > - If configs were not changed by dpkg during installation, restart service > immediately after installation; > - If configs were changed by dpkg during installation, do not restart > service (either stop, or do not start).
Why would you want to do that? It's definitely what I would expect from a package. > As far as I remember, if default configs in a package differ from previous > package configs, dialogue will be shown. By default the dialogue is shown if both the new package version and the file on disk differ from each other and the old package version. But it can be overridden with --force-conf* > Can I somehow automatically check > its result during package installation process and make it a condition in > postinst (or even solve the problem via 'rules' somehow)? So you want to check if the conffile on disk matches (or has the same hash as) the one in the package? /var/lib/dpkg/status contains md5sums of conffiles, but I don't remember when in the install process they're updated. Or you could produce your own hash sum, ship it in the package and compare in postinst. Grüße Timo
signature.asc
Description: This is a digitally signed message part.