( cd /vservers/$lxc/etc/apt ; head -1 sources.list | sed -e s,main,universe, > sources.list.d/universe.list )
# also adding a link to updates sounds about right
( cd /vservers/$lxc/etc/apt ; head -1 sources.list | sed -e 's, main,-updates main,' > sources.list.d/updates.list )
+ # tell apt about the changes
+ chroot /vservers/$lxc apt-get update
fi
for package in $packages ; do
# container not started yet
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