This file is indexed.

postinst is in autofs 5.1.2-1ubuntu3.

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
55
56
57
58
59
#!/bin/sh
set -e

if [ "$1" = "configure" ]; then
  for file in auto.master auto.net auto.misc auto.smb autofs.conf default/autofs; do
    # transfer ownership from old autofs5 package
    case "`ucfq -w /etc/$file`" in
      *:autofs5:*) force=--force ;;
      *) force= ;;
    esac
    ucfr $force autofs /etc/$file
    ucf /usr/share/autofs/conffiles/$file /etc/$file
  done
fi

# In version 5.0.6 (wheezy), the package has been renamed
# from autofs5 to autofs.  We properly Breaks/Replaces the old package,
# and dummy/transitional `autofs5' is also provided, so regular upgrades
# and new installs works.  But when a system had old autofs5 installed
# and the user installs new autofs manually, the system ends up having
# config files of old autofs5, together with maintainer scripts, and
# this new autofs package.  We need to ensure that old autofs5 package
# can be purged, but its maintscripts tries to deregister/remove
# ucf-controlled files, -- the same as we maintain above.  We must stop
# it from doing so, and the only way we currently know to do that is to
# REMOVE old package's maintscripts to stop it from being executed.
# Suggested by Ben Hutchings and Steve Langasek.  #686146
if [ "$1" = configure ]; then
  if postrm="$(dpkg-query -c autofs5 postrm 2>/dev/null)" && [ -n "$postrm" ]
  then
    rm -f "$postrm"
  fi
fi

# Automatically added by dh_systemd_enable/11.1.6ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	# This will only remove masks created by d-s-h on package removal.
	deb-systemd-helper unmask 'autofs.service' >/dev/null || true

	# was-enabled defaults to true, so new installations run enable.
	if deb-systemd-helper --quiet was-enabled 'autofs.service'; then
		# Enables the unit on first installation, creates new
		# symlinks on upgrades if the unit file has changed.
		deb-systemd-helper enable 'autofs.service' >/dev/null || true
	else
		# Update the statefile to add new symlinks (if any), which need to be
		# cleaned up on purge. Also remove old symlinks.
		deb-systemd-helper update-state 'autofs.service' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_installinit/11.1.6ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "/etc/init.d/autofs" ]; then
		update-rc.d autofs start 19 2 3 4 5 . stop 81 0 1 6 . >/dev/null
		invoke-rc.d autofs start || exit 1
	fi
fi
# End automatically added section