- if [ -n "$BUILD_MODE" ] ; then
- post_install_build $lxc $personality
- if [ -n "$START_VM" ] ; then
- virsh -c lxc:/// start $lxc
- # manually run dhclient in guest - somehow this network won't start on its own
- # we need the --noseclabel flag with recent libvirt's
- # was not required with f20/libvirt-1.2.5
- # but is now with f21/libvirt-1.2.9
- virsh -c lxc:/// lxc-enter-namespace --noseclabel $lxc /usr/bin/$personality /bin/bash -c "dhclient $VIF_GUEST" || :
- fi
- else
- post_install_myplc $lxc $personality
- if [ -n "$START_VM" ] ; then
- virsh -c lxc:/// start $lxc
- # it sounds like we don't need ssh per se any more
- # it still makes sense to wait for network readiness though
- # some day maybe...
+ # post install hook
+ [ -n "$NAT_MODE" ] && post_install_natip $lxc $personality || post_install_myplc $lxc $personality
+ # start the VM unless specified otherwise
+ if [ -n "$START_VM" ] ; then
+ echo Starting guest $lxc
+ virsh -c lxc:/// start $lxc
+ if [ -n "$NAT_MODE" ] ; then