You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
460 B

#!/bin/bash
wd=`pwd`
if [ -z "$LXC_GUEST_IP" ]; then
LXC_GUEST_IP=10.0.2.5
fi
if [ -z "$LXC_BRIDGE" ]; then
LXC_BRIDGE=br0
fi
OLD_IFS=$IFS
IFS=.
VERSION=($(lxc-start --version))
IFS=$OLD_IFS
if [ $VERSION -ge 3 ]; then
LXC_CONFIG=etc/lxc.3.config.in
else
LXC_CONFIG=etc/lxc.config.in
fi
sed "s;ROOTFS;$wd/target-$LXC_SUITE-$LXC_ARCH;;s;ARCH;$LXC_ARCH;g;;s;GUESTIP;$LXC_GUEST_IP;g;s;GUESTLINK;$LXC_BRIDGE;g" < $LXC_CONFIG > var/lxc.config