~ubuntu-branches/ubuntu/lucid/dhcp3/lucid-updates

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

set -e

case "$1" in
    install|upgrade)
        if [ ! -e /etc/dhcp3/dhcpd.conf ] && [ -e /etc/dhcpd.conf ]; then
            mkdir -p /etc/dhcp3
            cp /etc/dhcpd.conf /etc/dhcp3/dhcpd.conf
        fi
        ;;

    abort-upgrade)
        ;;

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

APP_PROFILE="usr.sbin.dhcpd3"
APP_CONFFILE="/etc/apparmor.d/$APP_PROFILE"
APP_COMPLAIN="/etc/apparmor.d/force-complain/$APP_PROFILE"
if [ "$1" = "upgrade" ]; then
    mkdir -p `dirname $APP_COMPLAIN` 2>/dev/null || true
    if dpkg --compare-versions $2 lt "3.0.4-12ubuntu4" ; then
        # force-complain for pre-apparmor upgrades
        ln -sf $APP_CONFFILE $APP_COMPLAIN
    fi
fi

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

#DEBHELPER#

exit 0