File: postinst

package info (click to toggle)
llgal 0.13.10-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 432 kB
  • ctags: 117
  • sloc: perl: 2,722; makefile: 162; sh: 33; php: 15
file content (22 lines) | stat: -rw-r--r-- 461 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -e
#DEBHELPER#

# 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" le "0.11-1"; then
	mv_conffile "/etc/llgalrc" "/etc/llgal/llgalrc"
    fi
esac