aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-02-08 13:31:58 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-02-08 13:33:59 +0000
commit5355d010445fdc323d07261f22ce052d017ded66 (patch)
tree117ef9897813e09b04406bfa77837c328124499a /main/lxc
parentc73985b8e9c226077c45f25b4a76cf3ecd39529a (diff)
downloadaports-5355d010445fdc323d07261f22ce052d017ded66.tar.bz2
aports-5355d010445fdc323d07261f22ce052d017ded66.tar.xz
main/lxc: fixes for shutdown
Diffstat (limited to 'main/lxc')
-rw-r--r--main/lxc/APKBUILD12
-rw-r--r--main/lxc/bb-shutdown.patch26
-rw-r--r--main/lxc/lxc.initd5
3 files changed, 34 insertions, 9 deletions
diff --git a/main/lxc/APKBUILD b/main/lxc/APKBUILD
index 79744c6441..227d96dac6 100644
--- a/main/lxc/APKBUILD
+++ b/main/lxc/APKBUILD
@@ -3,7 +3,7 @@
pkgname=lxc
pkgver=0.8.0
_mypkgver=${pkgver/_rc/-rc}
-pkgrel=4
+pkgrel=5
pkgdesc="linux containers - tools"
url="http://lxc.sourceforge.net/"
arch="all"
@@ -16,6 +16,7 @@ subpackages="$pkgname-dev $pkgname-doc"
source="http://lxc.sourceforge.net/download/lxc/$pkgname-$_mypkgver.tar.gz
bb-rm.patch
0001-lxc-start-add-option-p-pidfile-FILE-for-use-with-dae.patch
+ bb-shutdown.patch
lxc.initd
setup-lxc-template
setup-lxc-guest
@@ -58,21 +59,24 @@ package() {
md5sums="7304fa57146ce687f749b5df876bb20d lxc-0.8.0.tar.gz
f0f675456a1751aded10aa428bda9e16 bb-rm.patch
1bf081cd9d66c65f3611ed4af58ef48f 0001-lxc-start-add-option-p-pidfile-FILE-for-use-with-dae.patch
-07c0a29753770f6b028891f6549aab71 lxc.initd
+5b4da5220bac07bfdebf701161c1d6a8 bb-shutdown.patch
+f3c6998798b13425b8d0647bad0834a8 lxc.initd
45d0f604310e58a1359f1745a4739843 setup-lxc-template
c3f7fd7e85d40c4a4b1b427048ff9652 setup-lxc-guest
345996a4365b566d881d726fc6156ec2 lxc-alpine"
sha256sums="eac833730b94e423d4bef6834bc4a716437d2abd6ab8b24334c506aaaa08692c lxc-0.8.0.tar.gz
e25b074eb09fdb471a2a816ab88df2f247f61ae8208a42044eaf91d1d5cc2fcc bb-rm.patch
0c3d8b40db692993b5d20dc9e6d6174579af8a2304e8f895bc5bce94eab4d6df 0001-lxc-start-add-option-p-pidfile-FILE-for-use-with-dae.patch
-02d7965ca73218b23ad6a3de826f38176691e54379fd320257e585ee9b5c8a79 lxc.initd
+846c09def4e0fa796e7fe9df9f03947465a0407c6ce0565f21788293cdfadae7 bb-shutdown.patch
+77c64e6137457be89c150b82d681a3eb5c7c1f06af142a321703fc9a43bff200 lxc.initd
e027a75881d720f705c5b844b80b815de0db78df9deafde36dedb1e079d6387a setup-lxc-template
7a2aa24263efd925f90f4e7c3277f9f195465f121ff9557ae0c3408a5f95b328 setup-lxc-guest
e423a2abb2e6bc4df58c515a6ea06fd44932077b74b6211cef1272e2ba9809b4 lxc-alpine"
sha512sums="47333e2010d0f4488b8876ba933f2d26304874bec0371a7ab3b6e5bd1a50a7d2312ff8507e273f1ee2341a7f2e3b79cd71e5e19ac31006a4e429ee96b01733f6 lxc-0.8.0.tar.gz
fd6c34a8775832b42e4b0a9f1e294a1bb54ecc6117277f8f02c1a24e4fc956480fe652aa889d0edf7d50fc1f36db3b7bca21d87a0365ab7b8763a20b0879806c bb-rm.patch
f097d17eb306c25790fb4acfe48e3af86cca40c9250a94cbe5012321d0f07019fc5af0b31443352d0d458c9bfef7e05707263b381911a97285eeab49098176f0 0001-lxc-start-add-option-p-pidfile-FILE-for-use-with-dae.patch
-9bf6cb72b44efcc2719b29fb56cfb01484ace0338cd611b6cf360335f8ad0dabda4b842aa76077c86722d230286d729d0abd78012f92a4de4e23fce87648ad59 lxc.initd
+6e9902a51374cb98cda92ff1629c791c942a10493d6aa84a52ddd8402db19cfea21952ae8ad2bfe63002f985e3db216d3618ffff5a6e36c2995df02320fad2f7 bb-shutdown.patch
+4e56f7b869345f936df54c4359abdd3b8d0244c0fd71a9a787bc2393c4caabca22ca8417f16da47f02c86294750986fd674d0d2e7c1b1d096076873b22c07a29 lxc.initd
d9c4d20cc4e07b7bf53361c7ea51043c578faef09a8ed588e77362ce2f7d531348300a190d22f3787f41ed8bea24d1734c00a5a7143791a49451dde88b06d51b setup-lxc-template
a3fa846878f9fb897a607a20ae6847c067dc651eaf8c3d8a75ecee1057638226591825723c7fe7ad38a6647c158b870101d72c660e8bebedbdc1fa95a1c5cf5c setup-lxc-guest
d3b25dfe2a34c4ed031c557dbf1d4b51c57d09d3a38a34573717f36b1e764704720f2b42fed09067af8d50427a15e9be94d1f08f5935f681a18947f4748e474f lxc-alpine"
diff --git a/main/lxc/bb-shutdown.patch b/main/lxc/bb-shutdown.patch
new file mode 100644
index 0000000000..ec87000e44
--- /dev/null
+++ b/main/lxc/bb-shutdown.patch
@@ -0,0 +1,26 @@
+--- ./src/lxc/lxc-shutdown.in.orig 2013-02-08 13:28:28.489406380 +0000
++++ ./src/lxc/lxc-shutdown.in 2013-02-08 13:30:31.910466926 +0000
+@@ -113,11 +113,21 @@
+ exit 1
+ fi
+
++signal_reboot=INT
++signal_poweroff=PWR
++init_exe=$(readlink -f /proc/$pid/exe)
++case ${init_exe} in
++ */busybox)
++ signal_reboot=TERM
++ signal_poweroff=USR2
++ ;;
++esac
++
+ if [ $reboot -eq 1 ]; then
+- kill -INT $pid
++ kill -s $signal_reboot $pid
+ exit 0
+ else
+- kill -PWR $pid
++ kill -s $signale_poweroff $pid
+ fi
+
+ if [ $dowait -eq 0 ]; then
diff --git a/main/lxc/lxc.initd b/main/lxc/lxc.initd
index cfa90c8690..4ece09f9a9 100644
--- a/main/lxc/lxc.initd
+++ b/main/lxc/lxc.initd
@@ -74,11 +74,6 @@ start() {
stop() {
checkconfig || return 1
- if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then
- ewarn "${CONTAINER} doesn't seem to be started."
- return 0
- fi
-
ebegin "Shutting down system in ${CONTAINER}"
start-stop-daemon --stop --pidfile ${pidfile} \
--retry ${POWEROFF_SIGNAL:-SIGUSR2}/${TIMEOUT:-30} \