summaryrefslogtreecommitdiff
path: root/debian/inetutils-syslogd.postinst
blob: df9251d61e924a373f98c4e0f4e45a231de2e1a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

set -e

# Move a conffile without triggering a dpkg question
mv_conffile()
{
  oldconffile="$1"
  newconffile="$2"

  if [ -e "$oldconffile" ]; then
    echo "Preserving user changes to $newconffile ..."
    mv -f "$newconffile" "$newconffile".dpkg-new
    mv -f "$oldconffile" "$newconffile"
  fi
}

case "$1" in
configure)
  if dpkg --compare-versions "$2" lt "2:1.5.dfsg.1-5"; then
    mv_conffile /etc/default/syslogd /etc/default/inetutils-syslogd
  fi
esac

#DEBHELPER#

exit 0