~bladernr/maas-cert-server/lxd-mirror-preseed

« back to all changes in this revision

Viewing changes to usr/sbin/maniacs-setup

  • Committer: Jeff Lane
  • Author(s): Rod Smith
  • Date: 2016-04-20 19:45:28 UTC
  • mfrom: (53.1.1 015-fix-network-naming)
  • Revision ID: jeff_lane-20160420194528-7rh7p6oh8033eqsc
Instead of using one preseed file for both standard MAAS and custom images, create two files. The standard MAAS preseed file does not attempt to adjust /etc/network/interfaces; only the custom-image preseed does that. This should enable MAAS to set the networking the way it wants to. The cost is that it might not bring up eth1 and above, but at least it won't fail to deploy.

This change also includes a tweak to maniacs-setup to install the correct preseed files. Users will need to run "sudo maniacs-setup -p" to replace their old preseed files with the new ones.

Show diffs side-by-side

added added

removed removed

Lines of Context:
701
701
    if [ ! -f /etc/maas/preseeds/curtin_userdata_custom-orig ] ; then
702
702
        cp /etc/maas/preseeds/curtin_userdata_custom /etc/maas/preseeds/curtin_userdata_custom-orig
703
703
    fi
704
 
    cp /usr/share/maas-cert-server/preseed/curtin_userdata_cert /etc/maas/preseeds/curtin_userdata_custom
 
704
    cp /usr/share/maas-cert-server/preseed/curtin_userdata_custom_cert /etc/maas/preseeds/curtin_userdata_custom
705
705
    if [ $MIRRORED -eq 1 ] ; then
706
706
        sed -i s/ppa.launchpad.net/$INTERNAL_IP/g /etc/maas/preseeds/generic
707
707
        sed -i s/ppa.launchpad.net/$INTERNAL_IP/g /etc/maas/preseeds/curtin_userdata