Consolidate lucid, maverick, natty, and oneiric templates into one 'ubuntu'
template.
Add support for specifying architecture.
Add support for '--trim|-x' option, which removes services like the lucid
template used to. This creates smaller, faster-booting containers, but they
will not be safe with certain upgrades, like mountall or udev. When -x is
not specified for lucid or maverick container, then install lxcguest from
the ubuntu-virt ppa, since it does not exist in the official archives, and
the container is not safe to boot without lxcguest.
Add support for '--bindhome user' option, which will cause /home/user
to be bind-mounted into the container, and create the user with his
original password, shell, and group memberships in the container.
changelog:
june 23:
lxc-ubuntu template: set lxc.arch in config
install lxcguest when NOT trimming the container
lxc-ubuntu: always install lxcguest in postprocess
Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com
---
configure.ac |5 +-
doc/lxc-create.sgml.in|2 +-
templates/Makefile.am |5 +-
templates/lxc-lucid.in| 361 --
templates/lxc-maverick.in | 284 ---
templates/lxc-natty.in| 285 ---
templates/lxc-oneiric.in | 285 ---
templates/lxc-ubuntu.in | 479 +
8 files changed, 482 insertions(+), 1224 deletions(-)
delete mode 100644 templates/lxc-lucid.in
delete mode 100644 templates/lxc-maverick.in
delete mode 100644 templates/lxc-natty.in
delete mode 100644 templates/lxc-oneiric.in
create mode 100644 templates/lxc-ubuntu.in
diff --git a/configure.ac b/configure.ac
index 6cce1b4..81bc877 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,10 +139,7 @@ AC_CONFIG_FILES([
templates/Makefile
templates/lxc-lenny
templates/lxc-debian
- templates/lxc-lucid
- templates/lxc-maverick
- templates/lxc-natty
- templates/lxc-oneiric
+ templates/lxc-ubuntu
templates/lxc-busybox
templates/lxc-fedora
templates/lxc-sshd
diff --git a/doc/lxc-create.sgml.in b/doc/lxc-create.sgml.in
index de3ef4e..f3e8524 100644
--- a/doc/lxc-create.sgml.in
+++ b/doc/lxc-create.sgml.in
@@ -107,7 +107,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
para
'template' is the short name of an existing 'lxc-template'
script that is called by lxc-create,
- eg. busybox, debian, fedora, lucid, maverick, natty or sshd.
+ eg. busybox, debian, fedora, ubuntu or sshd.
Refer to the examples in filename@LXCTEMPLATEDIR@/filename
for details of the expected script structure.
/para
diff --git a/templates/Makefile.am b/templates/Makefile.am
index cfdf8f9..619eae5 100644
--- a/templates/Makefile.am
+++ b/templates/Makefile.am
@@ -3,10 +3,7 @@ templatesdir=@LXCTEMPLATEDIR@
templates_SCRIPTS = \
lxc-debian \
lxc-lenny \
- lxc-lucid \
- lxc-maverick \
- lxc-natty \
- lxc-oneiric \
+ lxc-ubuntu \
lxc-fedora \
lxc-busybox \
lxc-sshd
diff --git a/templates/lxc-lucid.in b/templates/lxc-lucid.in
deleted file mode 100644
index 88a4618..000
--- a/templates/lxc-lucid.in
+++ /dev/null
@@ -1,361 +0,0 @@
-#!/bin/bash
-
-#
-# template script for generating ubuntu/lucid container for LXC
-#
-# This script is based on lxc-debian (Daniel Lezcano daniel.lezc...@free.fr)
-#
-
-# Copyright � 2010 Wilhelm Meier
-# Author: Wilhelm Meier wilhelm.me...@fh-kl.de
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2, as
-# published by the Free Software Foundation.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-configure_ubuntu()
-{
-rootfs=$1
-hostname=$2
-
-# disable selinux in ubuntu
-mkdir -p $rootfs/selinux
-echo 0 $rootfs/selinux/enforce
-
- # configure the network using the dhcp
-cat EOF $rootfs/etc/network/interfaces
-auto lo
-iface lo inet loopback
-
-auto eth0
-iface eth0 inet dhcp
-EOF
-
-# set the hostname
-cat EOF $rootfs/etc/hostname
-$hostname
-EOF
-# set minimal hosts
-cat EOF $rootfs/etc/hosts
-127.0.0.1 localhost $hostname
-EOF
-
-# provide the lxc service
-cat EOF $rootfs/etc/init/lxc.conf
-# fake some events needed for correct startup other services
-
-description Container