aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Heider <a.heider@gmail.com>2021-01-26 09:00:47 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2021-02-08 21:43:00 +0100
commit4ba6fad7f7f9fe12633149d76fbf9d1486c06306 (patch)
tree479f6e54a89947f48048b41e78a81dd507aae7db
parentf5f01bcacd7838889cb83defca94af34e64a9141 (diff)
downloadupstream-4ba6fad7f7f9fe12633149d76fbf9d1486c06306.tar.gz
upstream-4ba6fad7f7f9fe12633149d76fbf9d1486c06306.tar.bz2
upstream-4ba6fad7f7f9fe12633149d76fbf9d1486c06306.zip
ltq-vdsl-app: shutdown upon sigterm
procd sends sigterm to stop daemons, hook it up. This speeds up the shutdown sequence and gets rid of the following message: daemon.info procd: Instance dsl_control::instance1 pid 15408 not stopped on SIGTERM, sending SIGKILL instead Signed-off-by: Andre Heider <a.heider@gmail.com> Tested-by: Martin Schiller <ms@dev.tdt.de>
-rw-r--r--package/network/config/ltq-vdsl-app/files/dsl_control2
-rw-r--r--package/network/config/ltq-vdsl-app/patches/201-sigterm.patch19
2 files changed, 19 insertions, 2 deletions
diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control
index 3f3cecbca5..5089d7ac31 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -307,8 +307,6 @@ start_service() {
}
stop_service() {
- # do not use dsl_cmd to not block when this is locked up by some other proess
- echo quit > /tmp/pipe/dsl_cpe0_cmd
DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \
DSL_INTERFACE_STATUS="DOWN" \
/sbin/dsl_notify.sh
diff --git a/package/network/config/ltq-vdsl-app/patches/201-sigterm.patch b/package/network/config/ltq-vdsl-app/patches/201-sigterm.patch
new file mode 100644
index 0000000000..68a416ce24
--- /dev/null
+++ b/package/network/config/ltq-vdsl-app/patches/201-sigterm.patch
@@ -0,0 +1,19 @@
+--- a/src/dsl_cpe_control.c
++++ b/src/dsl_cpe_control.c
+@@ -6504,7 +6504,7 @@ DSL_CPE_STATIC void DSL_CPE_Termination
+ /* ignore the signal, we'll handle by ourself */
+ signal (sig, SIG_IGN);
+
+- if (sig == SIGINT)
++ if (sig == SIGINT || sig == SIGTERM)
+ {
+ DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX "terminated" DSL_CPE_CRLF));
+ DSL_CPE_Termination ();
+@@ -6756,6 +6756,7 @@ DSL_int_t dsl_cpe_daemon (
+
+ #ifndef RTEMS
+ signal (SIGINT, DSL_CPE_TerminationHandler);
++ signal (SIGTERM, DSL_CPE_TerminationHandler);
+ #endif /* RTEMS*/
+
+ /* Open DSL_CPE_MAX_DSL_ENTITIES devices*/