File: inetutils-syslogd.postinst

package info (click to toggle)
inetutils 2%3A1.6-3.1%2Bsqueeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 8,972 kB
  • ctags: 7,360
  • sloc: ansic: 58,631; sh: 5,284; yacc: 1,151; makefile: 498; perl: 47
file content (28 lines) | stat: -rw-r--r-- 496 bytes parent folder | download | duplicates (2)
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