diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-07-01 22:47:11 +0000 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-07-01 22:47:40 +0000 |
commit | a2d2fe4f689be4be36fcb283dad99a7476ca58a5 (patch) | |
tree | 880be480fe3b8429fb4cb7218bb71621ac0d40e2 /patches | |
parent | 3f321b1f261671fad9f2db2556af4a5b5d8437d6 (diff) |
Shutdown on SIGPWR
Fixes: lxc stop does not work (Closes: GH-1)
Diffstat (limited to 'patches')
-rw-r--r-- | patches/procd-lede-17.01/002_lxd_signal_halt.patch | 28 | ||||
l--------- | patches/procd-openwrt-18.06/002_lxd_signal_halt.patch | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/patches/procd-lede-17.01/002_lxd_signal_halt.patch b/patches/procd-lede-17.01/002_lxd_signal_halt.patch new file mode 100644 index 0000000..306c39b --- /dev/null +++ b/patches/procd-lede-17.01/002_lxd_signal_halt.patch @@ -0,0 +1,28 @@ +--- a/initd/init.c.orig 2018-07-01 22:24:02.065349814 +0000 ++++ b/initd/init.c 2018-07-01 22:23:02.837917724 +0000 +@@ -77,6 +77,7 @@ + sigaction(SIGTERM, &sa_shutdown, NULL); + sigaction(SIGUSR1, &sa_shutdown, NULL); + sigaction(SIGUSR2, &sa_shutdown, NULL); ++ sigaction(SIGPWR, &sa_shutdown, NULL); + + early(); + cmdline(); +--- a/signal.c.orig 2018-03-28 09:29:49.000000000 +0000 ++++ b/signal.c 2018-07-01 22:23:23.357720944 +0000 +@@ -44,6 +44,7 @@ + break; + case SIGUSR1: + case SIGUSR2: ++ case SIGPWR: + event = RB_POWER_OFF; + msg = "poweroff"; + break; +@@ -90,6 +91,7 @@ + sigaction(SIGINT, &sa_shutdown, NULL); + sigaction(SIGUSR1, &sa_shutdown, NULL); + sigaction(SIGUSR2, &sa_shutdown, NULL); ++ sigaction(SIGPWR, &sa_shutdown, NULL); + sigaction(SIGSEGV, &sa_crash, NULL); + sigaction(SIGBUS, &sa_crash, NULL); + sigaction(SIGHUP, &sa_dummy, NULL); diff --git a/patches/procd-openwrt-18.06/002_lxd_signal_halt.patch b/patches/procd-openwrt-18.06/002_lxd_signal_halt.patch new file mode 120000 index 0000000..e91cbc0 --- /dev/null +++ b/patches/procd-openwrt-18.06/002_lxd_signal_halt.patch @@ -0,0 +1 @@ +../procd-lede-17.01/002_lxd_signal_halt.patch
\ No newline at end of file |