summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-06-07 12:59:28 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-06-07 12:59:28 +0000
commitb2e41ee2532b3a4608944677f6e33b110c78f00e (patch)
tree12be184722cb459de92bf9ea97f8800360eef1ea /app-emulation/lxc
parentFix build failure against gcc-4.7 (approved by binki) (diff)
downloadgentoo-2-b2e41ee2532b3a4608944677f6e33b110c78f00e.tar.gz
gentoo-2-b2e41ee2532b3a4608944677f6e33b110c78f00e.tar.bz2
gentoo-2-b2e41ee2532b3a4608944677f6e33b110c78f00e.zip
Update init script to better handle x32 containers.
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/lxc')
-rw-r--r--app-emulation/lxc/ChangeLog8
-rw-r--r--app-emulation/lxc/files/lxc.initd.218
-rw-r--r--app-emulation/lxc/lxc-0.8.0_rc1-r5.ebuild (renamed from app-emulation/lxc/lxc-0.8.0_rc1-r4.ebuild)2
3 files changed, 17 insertions, 11 deletions
diff --git a/app-emulation/lxc/ChangeLog b/app-emulation/lxc/ChangeLog
index 08c4cfbc5621..d6fb50c1f250 100644
--- a/app-emulation/lxc/ChangeLog
+++ b/app-emulation/lxc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/lxc
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.39 2012/05/31 23:03:11 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.40 2012/06/07 12:59:27 flameeyes Exp $
+
+*lxc-0.8.0_rc1-r5 (07 Jun 2012)
+
+ 07 Jun 2012; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.8.0_rc1-r5.ebuild,
+ -lxc-0.8.0_rc1-r4.ebuild, files/lxc.initd.2:
+ Update init script to better handle x32 containers.
31 May 2012; Zac Medico <zmedico@gentoo.org> lxc-0.8.0_rc1-r4.ebuild:
tweak inherit so repoman can parse it
diff --git a/app-emulation/lxc/files/lxc.initd.2 b/app-emulation/lxc/files/lxc.initd.2
index 49f85bd5072c..0977eb6f958f 100644
--- a/app-emulation/lxc/files/lxc.initd.2
+++ b/app-emulation/lxc/files/lxc.initd.2
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd.2,v 1.3 2012/05/01 21:14:15 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd.2,v 1.4 2012/06/07 12:59:28 flameeyes Exp $
CONTAINER=${SVCNAME#*.}
@@ -12,7 +12,7 @@ lxc_get_configfile() {
echo "/etc/lxc/${CONTAINER}/config"
else
eerror "Unable to find a suitable configuration file."
- eerror "If you set up the contianer in a non-standard"
+ eerror "If you set up the container in a non-standard"
eerror "location, please set the CONFIGFILE variable."
return 1
fi
@@ -76,13 +76,13 @@ start() {
rootpath=$(lxc_get_var lxc.rootfs)
- # Check the format of our init and the chroot's init, to see if we
- # have to use linux32 or linux64...
- case $(scanelf -BF '%M#f' /sbin/init ${rootpath}/sbin/init | tr '\n' ':') in
- ELFCLASS64:ELFCLASS64:) setarch=;;
- ELFCLASS32:ELFCLASS32:) setarch=;;
- ELFCLASS32:ELFCLASS64:) setarch=linux64;;
- ELFCLASS64:ELFCLASS32:) setarch=linux32;;
+ # Check the format of our init and the chroot's init, to see
+ # if we have to use linux32 or linux64; always use setarch
+ # when required, as that makes it easier to deal with
+ # x32-based containers.
+ case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
+ EM_X86_64) setarch=linux64;;
+ EM_I386) setarch=linux32;;
esac
ebegin "Starting ${CONTAINER}"
diff --git a/app-emulation/lxc/lxc-0.8.0_rc1-r4.ebuild b/app-emulation/lxc/lxc-0.8.0_rc1-r5.ebuild
index 1b746879aa8b..e8db0254570f 100644
--- a/app-emulation/lxc/lxc-0.8.0_rc1-r4.ebuild
+++ b/app-emulation/lxc/lxc-0.8.0_rc1-r5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.8.0_rc1-r4.ebuild,v 1.3 2012/05/31 23:03:11 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.8.0_rc1-r5.ebuild,v 1.1 2012/06/07 12:59:27 flameeyes Exp $
EAPI="4"