Updated preinst, postinst, and prerm script from Debian's 2.1.10+dfsg-2
authorFajar A. Nugraha <github@fajar.net>
Mon, 16 Jan 2012 07:42:29 +0000 (14:42 +0700)
committerFajar A. Nugraha <github@fajar.net>
Mon, 16 Jan 2012 07:49:17 +0000 (14:49 +0700)
commit36747cf6ec95440708feafc8139cec0f5a64345b
tree2cba98b3aebeb24954d0a5801a3c9b140983aef3
parente29ea9e62681d2e4e456c25279de1be4356155bf
Updated preinst, postinst, and prerm script from Debian's 2.1.10+dfsg-2

This commit applies changes to preinst, postinst, and prerm script on
Debian's 2.1.10+dfsg-2, by Josip Rodin <joy-packages@debian.org>.

Relevant changelog from Debian's 2.1.10+dfsg-2 changelog:
...
We now have to send SIGHUP to the daemon as a postrotate
action, which makes it reopen log files and continue normally.
...
* However, the latter signal also makes the server re-read configuration
  files, but unlike the initial server start, this all happens under
  the unprivileged user. That in turn means that if by any chance there
  is any part of FR configuration that happens not to be readable by
  group freerad (or whatever non-default is configured), the reload
  will fail, effectively silently, as the log has been moved away. Gah.
  So we have to make an effort to ensure that the configuration files
  are still readable by that user, otherwise the reload fails and the
  aforementioned bug is not fixed. The files seem to revert to
  root:root upon conffile actions, at least that's what happened to me
  and I think that was the cause. So, on upgrade, try to re-apply the
  dpkg-statoverrides on our /etc/freeradius/* stuff, whatever they are,
  under the assumption they will let the freerad group read config files
  as is the initial setup. (I wish dpkg-statoverride --update $file
  just did the right thing, but it doesn't, so there's a new local
  function that does that.)
* While doing the latter, noticed that we were checking for directories
  in dpkg-statoverride --list output with trailing slashes, but they
  get output without it, so it was a no-op. Fixed the check by removing
  the trailing slashes. Also then noticed that we were grepping --list
  output, but it takes an optional glob pattern, so saved us that
  pointless grep fork by using that facility, just as described in the
  policy manual.
debian/freeradius-common.postinst
debian/freeradius-common.prerm
debian/freeradius-mysql.postinst
debian/freeradius-mysql.prerm
debian/freeradius-postgresql.postinst
debian/freeradius-postgresql.prerm
debian/freeradius.postinst
debian/freeradius.preinst
debian/freeradius.prerm