This file is indexed.

preinst is in samba-libs 2:4.3.8+dfsg-0ubuntu1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
#
#

set -e

# Move files to private subdir now fhs patch is finally gone
if [ "$1" = "install" ]
then
	for file in passdb.tdb secrets.tdb schannel_store.tdb idmap2.tdb
	do
		if [ -e /var/lib/samba/$file ]
		then
			if [ -e /var/lib/samba/private/$file ] &&
				[ ! /var/lib/samba/$file -ef /var/lib/samba/private/$file ]
			then
				echo $file exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst
				echo rename one of them to allow the install/upgrade to continue
				echo http://bugs.debian.org/726472
				ls -al /var/lib/samba /var/lib/samba/private
				exit 1
			fi
		fi
	done
	for file in passdb.tdb secrets.tdb schannel_store.tdb idmap2.tdb
	do
		if [ -e /var/lib/samba/$file ]
		then
			if ! [ -e /var/lib/samba/private/$file ]
			then
				if [ ! -d /var/lib/samba/private ]
				then
					mkdir /var/lib/samba/private
				fi
				mv /var/lib/samba/$file /var/lib/samba/private/$file
				ln /var/lib/samba/private/$file /var/lib/samba/$file
			fi
		fi
	done

	# bug #454770
	# this is only relevant for upgrades from versions before 2:3.6.13-2
	# this bug was never present in a stable release
	if [ -e /etc/samba/idmap2.tdb ] \
		&& ! [ -e /var/lib/samba/private/idmap2.tdb ]
	then
		mv /etc/samba/idmap2.tdb /var/lib/samba/private/idmap2.tdb
	fi
fi




exit 0