Skip to content

Commit

Permalink
Added templates/lxc-centos for CentOS containers.
Browse files Browse the repository at this point in the history
This adds an lxc-centos template for crreating CentOS 5+ templates.  It
does NOT create CentOS 4 or earlier containers as these are way past
end of life and no longer supported.  It is based on the work of
Fajar A. Nugraha <github@fajar.net> who modified an earlier Fedora
template.  His work has been brought LARGELY into congruence with
the current Fedora template.  It still lacks the distro agnostic
bootstrap and systemd code from the Fedora template but those should
only be relevant with CentOS 7 when that can of worms pops open
sometime next year or so.

Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information
mhwarfield authored and stgraber committed Nov 26, 2013
1 parent fc739df commit 164105f
Show file tree
Hide file tree
Showing 4 changed files with 620 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -29,6 +29,7 @@ templates/lxc-alpine
templates/lxc-altlinux
templates/lxc-archlinux
templates/lxc-busybox
templates/lxc-centos
templates/lxc-cirros
templates/lxc-debian
templates/lxc-fedora
Expand Down
6 changes: 4 additions & 2 deletions configure.ac
Expand Up @@ -25,13 +25,14 @@ AC_GNU_SOURCE
# Detect the distribution. This is used for the default configuration and
# for some distro-specific build options.
AC_MSG_CHECKING([host distribution])
AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, fedora, suse, gentoo, debian, arch, slackware, paldo, openmandriva or pardus.]))
AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, paldo, openmandriva or pardus.]))
if test "z$with_distro" = "z"; then
with_distro=`lsb_release -is`
fi
if test "z$with_distro" = "z"; then
AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle")
AC_CHECK_FILE(/etc/centos-release,with_distro="centos")
AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora")
AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
Expand All @@ -52,7 +53,7 @@ case $with_distro in
ubuntu)
distroconf=default.conf.ubuntu
;;
redhat|fedora|oracle|oracleserver)
redhat|centos|fedora|oracle|oracleserver)
distroconf=default.conf.libvirt
;;
*)
Expand Down Expand Up @@ -534,6 +535,7 @@ AC_CONFIG_FILES([
templates/lxc-ubuntu-cloud
templates/lxc-opensuse
templates/lxc-busybox
templates/lxc-centos
templates/lxc-fedora
templates/lxc-openmandriva
templates/lxc-oracle
Expand Down
1 change: 1 addition & 0 deletions templates/Makefile.am
Expand Up @@ -5,6 +5,7 @@ templates_SCRIPTS = \
lxc-ubuntu \
lxc-ubuntu-cloud \
lxc-opensuse \
lxc-centos \
lxc-fedora \
lxc-openmandriva \
lxc-oracle \
Expand Down

0 comments on commit 164105f

Please sign in to comment.