~andreserl/maas/1.9rc2_packaging

« back to all changes in this revision

Viewing changes to debian/maas-dhcp.postinst

  • Committer: MAAS Lander
  • Author(s): Andres Rodriguez
  • Date: 2015-08-11 11:50:34 UTC
  • mfrom: (418.1.3 packaging)
  • Revision ID: maas_lander-20150811115034-fwx2fxgqhn3or6mr
[r=andreserl][bug=1482857][author=andreserl] Update the location of dhcpd.conf and dhcpd6.conf to be /var/lib/maas/
and handle upgrades. (LP: #1482857)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    then
19
19
       apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}" || true
20
20
    fi
 
21
 
 
22
    # Starting from 1.9, these config files are no longer stored in
 
23
    # /etc/maas, but are stored in /var/lib/maas. Note that these
 
24
    # are created automatically by MAAS. On upgrades, however, these
 
25
    # need to be moved to not break DHCP.
 
26
    if [ -f /etc/maas/dhcpd.conf ]; then
 
27
        mv /etc/maas/dhcpd.conf /var/lib/maas/
 
28
    fi
 
29
    if [ -f /etc/maas/dhcpd6.conf ]; then
 
30
        mv /etc/maas/dhcpd6.conf /var/lib/maas/
 
31
    fi
21
32
fi
22
33
 
23
34
#DEBHELPER#