This file is indexed.

preinst is in isc-dhcp-client 4.2.4-7ubuntu12.

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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh

set -e

case "$1" in
    install|upgrade)
        # Upgrade old lucid configs
        if [ -e /etc/dhcp/dhclient.conf ] && [ $(md5sum /etc/dhcp/dhclient.conf | cut -f1 -d ' ') = 5e012287a1dcf058b3fea4c5bf0bd95a ]; then
            sed -i -e '/host-name "<hostname>"/i #send host-name "andare.fugue.com";' \
                -e 's/host-name "<hostname>"/host-name = gethostname()/' \
                -e '/domain-search, host-name,$/a \
	dhcp6.name-servers, dhcp6.domain-search,' \
                -e '/ntp-servers;$/a \
	dhcp6.fqdn, dhcp6.sntp-servers;' \
                -e 's/ntp-servers;$/ntp-servers,/' \
                /etc/dhcp/dhclient.conf
        fi

    	# if the /etc/dhclient.conf from dhcp-client was modified, 
	# bring it forward to /etc/dhcp3/dhclient.conf, but in a way not
	# to upset dpkg about a changed conffile
        if [ ! -e /etc/dhcp3/dhclient.conf ] && [ -e /etc/dhclient.conf ] && \
	    ! >/dev/null 2>&1 md5sum -c - <<-EOF; then
		10830c7543724cfd36f10dd87a5f98eb  /etc/dhclient.conf
		EOF
		mkdir -p /etc/dhcp3
		cp /etc/dhclient.conf /etc/dhcp3/dhclient.conf.oldconfig
        fi

	# handle lingering dhclient.conf from lenny (this can be safely removed
	# after the wheezy release)
	if [ -e /etc/dhcp/dhclient.conf ] && \
		[ "`md5sum /etc/dhcp/dhclient.conf  | awk '{print $1;}'`" = 6e3910d75cd5cde0042ecb6d48492ae9 ]; then
		sed -i -e 's/rfc3442-classless-static-routes;/rfc3442-classless-static-routes, ntp-servers;/' /etc/dhcp/dhclient.conf
	fi

	# We renamed debug-enter to debug - handle the transition
	if [ ! -e /etc/dhcp3/dhclient-enter-hooks.d/debug ] && \
	      [ -e /etc/dhcp3/dhclient-enter-hooks.d/debug-enter ]; then
		mv /etc/dhcp3/dhclient-enter-hooks.d/debug-enter \
		   /etc/dhcp3/dhclient-enter-hooks.d/debug
	else
	    rm -f /etc/dhcp3/dhclient-enter-hooks.d/debug-enter
	fi

	# We renamed debug-exit to debug - handle the transition
	if [ ! -e /etc/dhcp3/dhclient-exit-hooks.d/debug ] && \
	      [ -e /etc/dhcp3/dhclient-exit-hooks.d/debug-exit ]; then
		mv /etc/dhcp3/dhclient-exit-hooks.d/debug-exit \
		   /etc/dhcp3/dhclient-exit-hooks.d/debug
	else
	    rm -f /etc/dhcp3/dhclient-exit-hooks.d/debug-exit
	fi

	# We moved /etc/dhcp3/dhclient-script to /sbin in 3.0.4-2
	if dpkg --compare-versions "$2" lt-nl "3.0.4-2"; then
		if [ -e /etc/dhcp3/dhclient-script ]; then
			if >/dev/null 2>&1 md5sum -c - <<-EOF; then
			2b18b5c59b26d00aa115716b3da2ed26  /etc/dhcp3/dhclient-script
			EOF
				rm -f /etc/dhcp3/dhclient-script
			fi
		fi
	fi
        ;;

    abort-upgrade)
        ;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0