File: postrm

package info (click to toggle)
slocate 3.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 236 kB
  • ctags: 116
  • sloc: ansic: 1,898; sh: 224; makefile: 80
file content (29 lines) | stat: -rw-r--r-- 775 bytes parent folder | download | duplicates (3)
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
#!/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

	delgroup $SLOCATE_GROUP
fi

#DEBHELPER#