On Sat, 2013-08-10 at 18:07 +0200, Michael Stapelberg wrote: > Now, we want to preserve the enabled/disabled state, i.e. on package > upgrades, we do _not_ want to re-enable the file and overwrite the > user’s choice. > > The best way to do this is: > > 1) call systemctl enable on the _initial_ package installation > 2) call systemctl disable on purge > > The issue is that in postinst, we don’t have the information whether > this is an initial package installation or not
Apologies if I'm missing something, but why not? From Policy 6.7: The `postinst' script may be called in the following ways: <postinst> `configure' <most-recently-configured-version> [...] If there is no most recently configured version `dpkg' will pass a null argument. [1] Regards, Adam -- To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org