diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-02-08 13:31:58 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-02-08 13:33:59 +0000 |
commit | 5355d010445fdc323d07261f22ce052d017ded66 (patch) | |
tree | 117ef9897813e09b04406bfa77837c328124499a /main/lxc/bb-shutdown.patch | |
parent | c73985b8e9c226077c45f25b4a76cf3ecd39529a (diff) | |
download | aports-5355d010445fdc323d07261f22ce052d017ded66.tar.bz2 aports-5355d010445fdc323d07261f22ce052d017ded66.tar.xz |
main/lxc: fixes for shutdown
Diffstat (limited to 'main/lxc/bb-shutdown.patch')
-rw-r--r-- | main/lxc/bb-shutdown.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/main/lxc/bb-shutdown.patch b/main/lxc/bb-shutdown.patch new file mode 100644 index 000000000..ec87000e4 --- /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 |