File: gom.preinst

package info (click to toggle)
gom 0.30.2-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 852 kB
  • ctags: 325
  • sloc: ansic: 3,021; sh: 1,548; makefile: 74
file content (36 lines) | stat: -rw-r--r-- 1,008 bytes parent folder | download | duplicates (5)
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
32
33
34
35
36
#!/bin/sh -e

#DEBHELPER#

#
# Policy 11.7.3 (templates), since 0.29.103-10
#
# dpkg would not delete dir share/doc/gom/examples/default, and, when installing files, would not
# overwrite it with a symlink to share/gom/default. Rather a dpkg bug, afaik.
# This fixes this simply and hopefully sanely.

# This is no longer dir, but symlink to share/gom/default
old_default_cfg="/usr/share/doc/gom/examples/default"
if [ -d "${old_default_cfg}" ]; then
	rm -rf ${old_default_cfg}
fi

case "$1" in
	upgrade|install)
		rcboot_file=/etc/rc.boot/gom
		if [ -e ${rcboot_file} ]; then
			. /usr/share/debconf/confmodule
			db_input critical gom/remove_obsolete_rcboot || true
			db_go || true
			db_get gom/remove_obsolete_rcboot || true
			if [ "$RET" = true ]; then
				rm -f ${rcboot_file}
			fi
		fi
		;;
esac

# All support for alternatives dropped, always remove
update-alternatives --remove gom /usr/bin/gom-c
update-alternatives --remove gom /usr/bin/gom-ct
update-alternatives --remove gom /usr/bin/gom-ctx