Only checking for the existence of $2 was the first thing I tried, after having read about that method somewhere. What I found when testing was that $2 always exists when executing postinst in keyboard-configuration. In case of an upgrade it's the previous package version, and otherwise it's the current package version.
Only checking for the existence of $2 was the first thing I tried, after having read about that method somewhere. What I found when testing was that $2 always exists when executing postinst in keyboard- configuration. In case of an upgrade it's the previous package version, and otherwise it's the current package version.