-function fedora_configure_init() {
- set -e
- set -x
- lxc=$1; shift
- lxc_root=$(lxcroot $lxc)
-
- sed -i 's|.sbin.start_udev||' ${lxc_root}/etc/rc.sysinit
- sed -i 's|.sbin.start_udev||' ${lxc_root}/etc/rc.d/rc.sysinit
- # don't mount devpts, for pete's sake
- sed -i 's/^.*dev.pts.*$/#\0/' ${lxc_root}/etc/rc.sysinit
- sed -i 's/^.*dev.pts.*$/#\0/' ${lxc_root}/etc/rc.d/rc.sysinit
- chroot ${lxc_root} $personality chkconfig udev-post off
- chroot ${lxc_root} $personality chkconfig network on
+function fedora_configure_network() {
+ local lxc="$1"
+ case $(network_config_method $fcdistro) in
+ ifcfg)
+ # probably no longer useful
+ local guest_ifcfg=${lxc_root}/etc/sysconfig/network-scripts/ifcfg-$VIF_GUEST
+ mkdir -p $(dirname ${guest_ifcfg})
+ if [ -n "$NAT_MODE" ]; then
+ write_guest_ifcfg_natip
+ else
+ write_guest_ifcfg_publicip
+ fi > $guest_ifcfg
+ ;;
+ networkmanager)
+ local guest_keyfile=${lxc_root}/etc/NetworkManager/system-connections/'Wired connection 1.nmconnection'
+ mkdir -p $(dirname "${guest_keyfile}")
+ if [ -n "$NAT_MODE" ]; then
+ write_guest_networkmanager_natip
+ else
+ write_guest_networkmanager_publicip
+ fi > "$guest_keyfile"
+ chmod 600 "$guest_keyfile"
+ ;;
+ esac