3
# $Id: dhcp-client.postinst,v 1.3.2.3 2004/05/26 16:45:04 peloy Exp $
11
abort-upgrade|abort-remove|abort-deconfigure)
16
echo "postinst called with unknown argument \`$1'" >&2
21
PATH_DHCLIENT_DB=/var/lib/dhcp/dhclient.leases
23
# --- Begin FHS migration code ---
25
# Starting with dhcp-2.0pl5-10 we are FHS-compliant. The following
26
# code takes care of moving important files in the old, non
27
# FHS-compliant directory (/var/dhcp/) to their new location
29
if [ -d /var/dhcp/ ]; then
30
mv /var/dhcp/dhclient* /var/lib/dhcp/ 2> /dev/null || true
31
rmdir /var/dhcp/ 2> /dev/null || true
34
# --- End FHS migration code ---
36
if [ ! -e $PATH_DHCLIENT_DB ]; then
37
touch $PATH_DHCLIENT_DB
40
# We handle the multiple occurence of the manual page dhcp-options.5 through
41
# the alternative system. It is nice to have this page in all the
42
# dhcp* packages and since I can't make one package to conflict
43
# with the others the alternatives system looks like a good way
44
# to solve the problem.
45
if [ "$1" != upgrade ]; then
46
update-alternatives --install /usr/share/man/man5/dhcp-options.5.gz \
48
/usr/share/man/man5/dhcp-options-dhclient.5.gz \
52
# I failed to handle the /usr/doc transition when I should have (shame
53
# on me; sorry Joey). This is an attempt to fix my oversight: if
54
# /usr/doc/dhcp-client is a symlink we remove it.
55
if [ -h /usr/doc/dhcp-client ]; then
56
rm -f /usr/doc/dhcp-client
59
# Since 2.0pl5-6.1 we do not start dhclient ourselves, we rely on
60
# ifup/ifdown or the PCMCIA subsystem for this. So, we remove here
61
# the old init script and the rc.d links.
62
rm -f /etc/init.d/dhcp-client
63
update-rc.d dhcp-client remove > /dev/null 2>&1