This file is indexed.

postinst is in lpr 1:2008.05.17+nmu1.

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
#!/bin/sh

if [ ! -e /etc/printcap ]; then
    cp /usr/share/doc/lpr/examples/printcap /etc/
fi

for i in /var/log/lp-acct /var/log/lp-errs
do
    if [ ! -f $i ]; then
	touch $i
	chmod 644 $i
    fi
done

# Fix permissions - everything needs to be lp.lp now since lpd drop priv. all over the place
# We also fix permissions if any file in spool is not owned by lp:lp OR the lead spool
# diretory does not have 2775 permissions.
if [ "$2" != ""  ] && dpkg --compare-versions "$2" lt 1:2003.09.23-7; then
	echo -n "Updating /var/spool/lpd permissions "
	chmod -f 2775 /var/spool/lpd
	chmod -f 2775 /var/spool/lpd/lp
	chmod -f 2775 /var/spool/lpd/remote
	chown -f lp:lp --recursive /var/spool/lpd
	chmod -f 640 `find /var/spool/lpd | grep /lock$` 2> /dev/null
        chmod -f 661 `find /var/spool/lpd | grep /.seq$` 2> /dev/null
	chown -f lp:lp `find /var/spool/lpd | grep /.seq$` 2> /dev/null
	echo "[done]"
fi

if [ -x /usr/sbin/update-mime -a "$1" = configure ] && dpkg --compare-versions "$2" lt 1:0.35-3; then
	update-mime
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/lpd" ]; then
	update-rc.d lpd defaults >/dev/null
	invoke-rc.d lpd start || exit $?
fi
# End automatically added section