summaryrefslogtreecommitdiff
path: root/debian/inetutils-syslogd.postinst
blob: 36e45495a131d688b17910e0450bb6b30fb8419f (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
29
30
31
#!/bin/sh
#
# $Id$
#

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