#virsh -c lxc:/// lxc-enter-namespace $lxc /bin/bash -c "apt-get -y install $DEBIAN_PREINSTALLED"
chroot $lxc_root apt-get update
chroot $lxc_root apt-get -y install $DEBIAN_PREINSTALLED
+ # configure hostname
+ cat <<EOF > ${lxc_root}/etc/hostname
+$GUEST_HOSTNAME
+EOF
+
}
function debian_configure () {
if [ -n "$BUILD_MODE" ] ; then
# we can now set GUEST_HOSTNAME safely
- [ -z "$GUEST_HOSTNAME" ] && GUEST_HOSTNAME=$lxc
+ [ -z "$GUEST_HOSTNAME" ] && GUEST_HOSTNAME=$(echo $lxc | sed -e 's,\.,-,g')
else
# as this command can be used in other contexts, not specifying
# a repo is considered a warning