File: postrm

package info (click to toggle)
slocate 2.4-2potato1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 228 kB
  • ctags: 177
  • sloc: ansic: 1,921; sh: 294; makefile: 59
file content (37 lines) | stat: -rw-r--r-- 958 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

SLOCATE_GROUP=slocate
SLOCATE_DIR=/var/lib/slocate

set -e

suffix=notslocate
if [ remove = "$1" ]; then
	dpkg-divert --package slocate --remove --rename \
		--divert /usr/bin/locate.$suffix \
			/usr/bin/locate
	dpkg-divert --package slocate --remove --rename \
		--divert /usr/bin/updatedb.$suffix \
			/usr/bin/updatedb
	dpkg-divert --package slocate --remove --rename \
		--divert /usr/share/man/man1/locate.$suffix.1.gz \
			/usr/share/man/man1/locate.1.gz
	dpkg-divert --package slocate --remove --rename \
		--divert /usr/share/man/man1/updatedb.$suffix.1.gz \
			/usr/share/man/man1/updatedb.1.gz
	dpkg-divert --package slocate --remove --rename \
		--divert /etc/cron.daily/find.$suffix \
			/etc/cron.daily/find
fi


if [ -x /usr/sbin/suidunregister -a -x /usr/bin/slocate ]
then
	echo "suidunregister -s slocate /usr/bin/slocate"
	suidunregister -s slocate /usr/bin/slocate
fi

groupdel $SLOCATE_GROUP 2>/dev/null || true


#DEBHELPER#