Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/lxc/files: lxc.initd.2
Date: Thu, 07 Jun 2012 12:59:38
Message-Id: 20120607125928.70DE92004B@flycatcher.gentoo.org
1 flameeyes 12/06/07 12:59:28
2
3 Modified: lxc.initd.2
4 Log:
5 Update init script to better handle x32 containers.
6
7 (Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.4 app-emulation/lxc/files/lxc.initd.2
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/lxc/files/lxc.initd.2?rev=1.4&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/lxc/files/lxc.initd.2?rev=1.4&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/lxc/files/lxc.initd.2?r1=1.3&r2=1.4
15
16 Index: lxc.initd.2
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd.2,v
19 retrieving revision 1.3
20 retrieving revision 1.4
21 diff -u -r1.3 -r1.4
22 --- lxc.initd.2 1 May 2012 21:14:15 -0000 1.3
23 +++ lxc.initd.2 7 Jun 2012 12:59:28 -0000 1.4
24 @@ -1,7 +1,7 @@
25 #!/sbin/runscript
26 # Copyright 1999-2012 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd.2,v 1.3 2012/05/01 21:14:15 flameeyes Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd.2,v 1.4 2012/06/07 12:59:28 flameeyes Exp $
30
31 CONTAINER=${SVCNAME#*.}
32
33 @@ -12,7 +12,7 @@
34 echo "/etc/lxc/${CONTAINER}/config"
35 else
36 eerror "Unable to find a suitable configuration file."
37 - eerror "If you set up the contianer in a non-standard"
38 + eerror "If you set up the container in a non-standard"
39 eerror "location, please set the CONFIGFILE variable."
40 return 1
41 fi
42 @@ -76,13 +76,13 @@
43
44 rootpath=$(lxc_get_var lxc.rootfs)
45
46 - # Check the format of our init and the chroot's init, to see if we
47 - # have to use linux32 or linux64...
48 - case $(scanelf -BF '%M#f' /sbin/init ${rootpath}/sbin/init | tr '\n' ':') in
49 - ELFCLASS64:ELFCLASS64:) setarch=;;
50 - ELFCLASS32:ELFCLASS32:) setarch=;;
51 - ELFCLASS32:ELFCLASS64:) setarch=linux64;;
52 - ELFCLASS64:ELFCLASS32:) setarch=linux32;;
53 + # Check the format of our init and the chroot's init, to see
54 + # if we have to use linux32 or linux64; always use setarch
55 + # when required, as that makes it easier to deal with
56 + # x32-based containers.
57 + case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
58 + EM_X86_64) setarch=linux64;;
59 + EM_I386) setarch=linux32;;
60 esac
61
62 ebegin "Starting ${CONTAINER}"