diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-09-28 21:47:46 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-09-28 21:47:46 +0000 |
commit | 11b6f039bd0375c57a548176168c28e56765b8b7 (patch) | |
tree | 77a4d44dd2733cd4ce48550c71f5ebf875b3d9cd /app-emulation | |
parent | Version bump, the bmc-watchdog patch is properly upstreamed. (diff) | |
download | historical-11b6f039bd0375c57a548176168c28e56765b8b7.tar.gz historical-11b6f039bd0375c57a548176168c28e56765b8b7.tar.bz2 historical-11b6f039bd0375c57a548176168c28e56765b8b7.zip |
Fix init script to find the correct PID for the container's init and use a 30-seconds timeout to see if it has stopped correctly. Thanks to Stef Simoens for both (bug #384265).
Package-Manager: portage-2.2.0_alpha59/cvs/Linux x86_64
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/lxc/ChangeLog | 10 | ||||
-rw-r--r-- | app-emulation/lxc/Manifest | 12 | ||||
-rw-r--r-- | app-emulation/lxc/files/lxc.initd | 14 | ||||
-rw-r--r-- | app-emulation/lxc/lxc-0.7.5-r2.ebuild (renamed from app-emulation/lxc/lxc-0.7.5-r1.ebuild) | 2 |
4 files changed, 25 insertions, 13 deletions
diff --git a/app-emulation/lxc/ChangeLog b/app-emulation/lxc/ChangeLog index d1add772c90b..992a2ecc8361 100644 --- a/app-emulation/lxc/ChangeLog +++ b/app-emulation/lxc/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-emulation/lxc # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.27 2011/09/14 19:39:40 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.28 2011/09/28 21:47:46 flameeyes Exp $ + +*lxc-0.7.5-r2 (28 Sep 2011) + + 28 Sep 2011; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.5-r1.ebuild, + +lxc-0.7.5-r2.ebuild, files/lxc.initd: + Fix init script to find the correct PID for the container's init and use a + 30-seconds timeout to see if it has stopped correctly. Thanks to Stef Simoens + for both (bug #384265). *lxc-0.7.5-r1 (14 Sep 2011) diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest index b29b9bf01bec..4b2826580a60 100644 --- a/app-emulation/lxc/Manifest +++ b/app-emulation/lxc/Manifest @@ -1,15 +1,15 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -AUX lxc.initd 3555 RMD160 b9bed6bf618d5da2e3e0db99ef0337c383a22fbe SHA1 81eb36e4286b623cb778ca6495fa1e50b9e0fa95 SHA256 1cf87a6fecf50e43828daf58b9bdd9a7a22006c16ea32137ac1d7d9d7f2984f5 +AUX lxc.initd 3669 RMD160 6826f16014989faca6461f020875f58982dc3d15 SHA1 7727b75b59ec71147ae2478bc6c7a838c96ec4b4 SHA256 71cbb6ecbfa10a43ff6e9bdddad2b9a331e55d18d49d63f4ee651dc03818f519 DIST lxc-0.7.5.tar.gz 265562 RMD160 93407be1ebf31bdcfa617e60672d9f86ba2940d1 SHA1 9712dccdcd2c10a522134fa17384a5b9e38fce0e SHA256 019ec63f250c874bf7625b1f1bf555b1a6e3a947937a4fca73100abddf829b1c -EBUILD lxc-0.7.5-r1.ebuild 3206 RMD160 d51c3d6e0910dea9d6e116b5955fca23a092cb73 SHA1 0c19a7257477147b44f7ec9d8e7f64f71b6e9d58 SHA256 dd6bb65d5add92e2e4606b32138cfce7a886182d603e2632c831bac581e74335 -MISC ChangeLog 6319 RMD160 230592f68e012f79671599ba8f7bee8873fd8c8b SHA1 9f5ab12069ba29fb0d132b9bc42e3dfc1f3f2e47 SHA256 24b343e8bfa4905468ba975359ec536da44751f93239314606c5fca7a87aaa69 +EBUILD lxc-0.7.5-r2.ebuild 3206 RMD160 1a476cf353c04c30b71c75a034a856c46a460146 SHA1 f877e25376e79352f199ec056c6b00155530bdf0 SHA256 2c15ec330886091bce73323aeef5198cd58e1f75dfe64dcaae7fe053b7a53781 +MISC ChangeLog 6651 RMD160 d4ab541e29d4e92f665e1995f98852abc2c09ec8 SHA1 da732d308d63ec13f6eda3df286cf2774daed2ed SHA256 fdc3bfb4cdd883597155b9ae63fce07fb6b78763f6d943c1eda088b973714d4c MISC metadata.xml 653 RMD160 d6139a7ce3a5dab18f33c7f111f2e7827c290723 SHA1 47ba631625b4f2b20e491a964e65c78dd236f6f2 SHA256 35f64761067f47ff7abd0e3f3cb57f4bab888a2546bf3267d59987505101a190 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEARECAAYFAk5xAvEACgkQAiZjviIA2XjrUACgmSt25ZuZ5vbnCoS1hWXOyeFv -uc4An2dp4Qx5EMlaH/0JiQCk6jsBqEZV -=Aaos +iEYEARECAAYFAk6DlfMACgkQAiZjviIA2Xhu9QCfYsZxzeigfp+SkqVLfy0T2gvI +YkgAnA4h5OzDEpbSTTmSfOEFBIuiTaqw +=VnMl -----END PGP SIGNATURE----- diff --git a/app-emulation/lxc/files/lxc.initd b/app-emulation/lxc/files/lxc.initd index 6266193031e6..7275826025a1 100644 --- a/app-emulation/lxc/files/lxc.initd +++ b/app-emulation/lxc/files/lxc.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd,v 1.7 2011/09/14 19:39:40 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd,v 1.8 2011/09/28 21:47:46 flameeyes Exp $ CONTAINER=${SVCNAME#*.} @@ -111,15 +111,19 @@ stop() { return 0 fi - init_pid=$(head -n1 ${cgroupmount}/${CONTAINER}/tasks) + init_pid=$(lxc-info -n ${CONTAINER} --pid | cut -d: -f 2) ebegin "Shutting down system in ${CONTAINER}" kill -INT ${init_pid} eend $? - sleep 15 - - missingprocs=$(pgrep -P ${init_pid}) + TIMEOUT=${TIMEOUT:-30} + i=0 + while [ -n "${missingprocs}" -a $i -lt ${TIMEOUT} ]; do + sleep 1 + missingprocs=$(pgrep -P ${init_pid}) + i=$(expr $i + 1) + done if [ -n "${missingprocs}" ]; then ewarn "Something failed to properly shut down in ${CONTAINER}" diff --git a/app-emulation/lxc/lxc-0.7.5-r1.ebuild b/app-emulation/lxc/lxc-0.7.5-r2.ebuild index 8b729caa0fce..991e418a521f 100644 --- a/app-emulation/lxc/lxc-0.7.5-r1.ebuild +++ b/app-emulation/lxc/lxc-0.7.5-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.7.5-r1.ebuild,v 1.1 2011/09/14 19:39:40 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.7.5-r2.ebuild,v 1.1 2011/09/28 21:47:46 flameeyes Exp $ EAPI="4" |