Commit b8bced69 by Serge Hallyn Committed by Daniel Lezcano

Update Ubuntu templates for quantal

parent 989e861d
...@@ -92,11 +92,11 @@ proc proc proc nodev,noexec,nosuid 0 0 ...@@ -92,11 +92,11 @@ proc proc proc nodev,noexec,nosuid 0 0
sysfs sys sysfs defaults 0 0 sysfs sys sysfs defaults 0 0
EOF EOF
# rmdir /dev/shm in precise containers. # rmdir /dev/shm in precise and quantal containers.
# I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did # I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did
# get bind mounted to the host's /run/shm. So try to rmdir # get bind mounted to the host's /run/shm. So try to rmdir
# it, and in case that fails move it out of the way. # it, and in case that fails move it out of the way.
if [ $release = "precise" ]; then if [ $release = "precise" ] || [ $release = "quantal" ]; then
[ -d "$rootfs/dev/shm" ] && rmdir $rootfs/dev/shm [ -d "$rootfs/dev/shm" ] && rmdir $rootfs/dev/shm
[ -e "$rootfs/dev/shm" ] && mv $rootfs/dev/shm $rootfs/dev/shm.bak [ -e "$rootfs/dev/shm" ] && mv $rootfs/dev/shm $rootfs/dev/shm.bak
ln -s /run/shm $rootfs/dev/shm ln -s /run/shm $rootfs/dev/shm
...@@ -139,7 +139,7 @@ release=lucid ...@@ -139,7 +139,7 @@ release=lucid
if [ -f /etc/lsb-release ]; then if [ -f /etc/lsb-release ]; then
. /etc/lsb-release . /etc/lsb-release
case "$DISTRIB_CODENAME" in case "$DISTRIB_CODENAME" in
lucid|maverick|natty|oneiric|precise) lucid|maverick|natty|oneiric|precise|quantal)
release=$DISTRIB_CODENAME release=$DISTRIB_CODENAME
;; ;;
esac esac
...@@ -160,7 +160,7 @@ else ...@@ -160,7 +160,7 @@ else
arch="amd64" arch="amd64"
elif [ "$arch" = "armv7l" ]; then elif [ "$arch" = "armv7l" ]; then
# note: arm images don't exist before oneiric; are called armhf in # note: arm images don't exist before oneiric; are called armhf in
# precise; and are not supported by the query, so we don't actually # precise and later; and are not supported by the query, so we don't actually
# support them yet (see check later on). When Query2 is available, # support them yet (see check later on). When Query2 is available,
# we'll use that to enable arm images. # we'll use that to enable arm images.
arch="armel" arch="armel"
......
...@@ -54,7 +54,7 @@ EOF ...@@ -54,7 +54,7 @@ EOF
127.0.0.1 localhost $hostname 127.0.0.1 localhost $hostname
EOF EOF
if [ "$release" != "precise" ]; then if [ "$release" != "precise" ] && [ "$release" != "quantal" ]; then
# suppress log level output for udev # suppress log level output for udev
sed -i "s/=\"err\"/=0/" $rootfs/etc/udev/udev.conf sed -i "s/=\"err\"/=0/" $rootfs/etc/udev/udev.conf
...@@ -78,7 +78,7 @@ finalize_user() ...@@ -78,7 +78,7 @@ finalize_user()
{ {
user=$1 user=$1
if [ "$release" = "precise" ]; then if [ "$release" = "precise" ] || [ "$release" = "quantal" ]; then
groups="sudo" groups="sudo"
else else
groups="sudo admin" groups="sudo admin"
...@@ -310,7 +310,7 @@ copy_configuration() ...@@ -310,7 +310,7 @@ copy_configuration()
fi fi
ttydir="" ttydir=""
if [ $release = "precise" ]; then if [ $release = "precise" ] || [ $release = "quantal" ]; then
ttydir=" lxc" ttydir=" lxc"
fi fi
...@@ -518,11 +518,11 @@ post_process() ...@@ -518,11 +518,11 @@ post_process()
chroot $rootfs apt-get install --force-yes -y --no-install-recommends upstart:${hostarch} mountall:amd64 iproute:amd64 isc-dhcp-client:amd64 chroot $rootfs apt-get install --force-yes -y --no-install-recommends upstart:${hostarch} mountall:amd64 iproute:amd64 isc-dhcp-client:amd64
fi fi
# rmdir /dev/shm in precise containers. # rmdir /dev/shm in precise and quantal containers.
# I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did # I'm afraid of doing rm -rf $rootfs/dev/shm, in case it did
# get bind mounted to the host's /run/shm. So try to rmdir # get bind mounted to the host's /run/shm. So try to rmdir
# it, and in case that fails move it out of the way. # it, and in case that fails move it out of the way.
if [ $release = "precise" ]; then if [ $release = "precise" ] || [ $release = "quantal" ]; then
[ -d "$rootfs/dev/shm" ] && rmdir $rootfs/dev/shm [ -d "$rootfs/dev/shm" ] && rmdir $rootfs/dev/shm
[ -e "$rootfs/dev/shm" ] && mv $rootfs/dev/shm $rootfs/dev/shm.bak [ -e "$rootfs/dev/shm" ] && mv $rootfs/dev/shm $rootfs/dev/shm.bak
ln -s /run/shm $rootfs/dev/shm ln -s /run/shm $rootfs/dev/shm
...@@ -571,7 +571,7 @@ usage() ...@@ -571,7 +571,7 @@ usage()
cat <<EOF cat <<EOF
$1 -h|--help [-a|--arch] [-b|--bindhome <user>] [--trim] [-d|--debug] $1 -h|--help [-a|--arch] [-b|--bindhome <user>] [--trim] [-d|--debug]
[-F | --flush-cache] [-r|--release <release>] [ -S | --auth-key <keyfile>] [-F | --flush-cache] [-r|--release <release>] [ -S | --auth-key <keyfile>]
release: lucid | maverick | natty | oneiric | precise release: lucid | maverick | natty | oneiric | precise | quantal
trim: make a minimal (faster, but not upgrade-safe) container trim: make a minimal (faster, but not upgrade-safe) container
bindhome: bind <user>'s home into the container bindhome: bind <user>'s home into the container
The ubuntu user will not be created, and <user> will have The ubuntu user will not be created, and <user> will have
...@@ -593,7 +593,7 @@ release=lucid ...@@ -593,7 +593,7 @@ release=lucid
if [ -f /etc/lsb-release ]; then if [ -f /etc/lsb-release ]; then
. /etc/lsb-release . /etc/lsb-release
case "$DISTRIB_CODENAME" in case "$DISTRIB_CODENAME" in
lucid|maverick|natty|oneiric|precise) lucid|maverick|natty|oneiric|precise|quantal)
release=$DISTRIB_CODENAME release=$DISTRIB_CODENAME
;; ;;
esac esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment