diff options
author | Maxin B. John <maxin.john@intel.com> | 2018-03-16 10:38:10 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-20 09:59:32 +0000 |
commit | c3c336f106d579450ad09eedae830162a817214c (patch) | |
tree | 8da34dc7ff65ae48208d11df659a6b649a3253a7 /meta | |
parent | eeafb851244f3aa71181776f7a3b5c5e28cbe19a (diff) | |
download | poky-c3c336f106d579450ad09eedae830162a817214c.tar.gz |
watchdog: remove interdependencies of watchdog and wd_keepalive
Since watchdog and watchdog-keepalive packages can't be installed
together, move wd_keepalive.service to watchdog-keepalive package.
Remove the inter-dependencies of watchdog and wd_keepalive
services as well.
[YOCTO #12565]
(From OE-Core rev: 1d09eacc78ff44df54d6ace26702f4d9bf9e639c)
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch | 68 | ||||
-rw-r--r-- | meta/recipes-extended/watchdog/watchdog_5.15.bb | 6 |
2 files changed, 73 insertions, 1 deletions
diff --git a/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch b/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch new file mode 100644 index 0000000000..338e0cd14f --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog/0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From c1fe14fa5bd168292cc4670034bc48b954e9dac7 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Maxin B. John" <maxin.john@intel.com> | ||
3 | Date: Tue, 13 Mar 2018 14:49:55 +0200 | ||
4 | Subject: [PATCH] watchdog: remove interdependencies of watchdog and | ||
5 | wd_keepalive services | ||
6 | |||
7 | Since watchdog and watchdog-keepalive packages can't be installed | ||
8 | together, remove the inter-dependencies of watchdog and wd_keepalive | ||
9 | services | ||
10 | |||
11 | Upstream-Status: Inappropriate [oe specific] | ||
12 | |||
13 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
14 | --- | ||
15 | debian/watchdog.service | 9 +++------ | ||
16 | debian/wd_keepalive.service | 10 +++++----- | ||
17 | 2 files changed, 8 insertions(+), 11 deletions(-) | ||
18 | |||
19 | diff --git a/debian/watchdog.service b/debian/watchdog.service | ||
20 | index 7a2fc36..f31d1fe 100644 | ||
21 | --- a/debian/watchdog.service | ||
22 | +++ b/debian/watchdog.service | ||
23 | @@ -1,16 +1,13 @@ | ||
24 | [Unit] | ||
25 | Description=watchdog daemon | ||
26 | -Conflicts=wd_keepalive.service | ||
27 | After=multi-user.target | ||
28 | -OnFailure=wd_keepalive.service | ||
29 | |||
30 | [Service] | ||
31 | Type=forking | ||
32 | EnvironmentFile=/etc/default/watchdog | ||
33 | ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module' | ||
34 | -ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options' | ||
35 | -ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false' | ||
36 | +ExecStart=/bin/sh -c '[ x$run_watchdog != x1 ] || exec /usr/sbin/watchdog $watchdog_options' | ||
37 | +PIDFile=/var/run/watchdog.pid | ||
38 | |||
39 | [Install] | ||
40 | -WantedBy=default.target | ||
41 | - | ||
42 | +WantedBy=multi-user.target | ||
43 | diff --git a/debian/wd_keepalive.service b/debian/wd_keepalive.service | ||
44 | index 45b018e..7f8b1dc 100644 | ||
45 | --- a/debian/wd_keepalive.service | ||
46 | +++ b/debian/wd_keepalive.service | ||
47 | @@ -1,13 +1,13 @@ | ||
48 | [Unit] | ||
49 | Description=watchdog keepalive daemon | ||
50 | -Before=watchdog.service shutdown.target | ||
51 | -Conflicts=watchdog.service shutdown.target | ||
52 | +After=multi-user.target | ||
53 | |||
54 | [Service] | ||
55 | Type=forking | ||
56 | EnvironmentFile=/etc/default/watchdog | ||
57 | ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module' | ||
58 | -ExecStartPre=-/bin/systemctl reset-failed watchdog.service | ||
59 | ExecStart=/usr/sbin/wd_keepalive $watchdog_options | ||
60 | -ExecStartPost=/bin/sh -c 'ln -s /var/run/wd_keepalive.pid /run/sendsigs.omit.d/wd_keepalive.pid' | ||
61 | -ExecStopPost=/bin/sh -c 'rm -f /run/sendsigs.omit.d/wd_keepalive.pid' | ||
62 | +PIDFile=/var/run/wd_keepalive.pid | ||
63 | + | ||
64 | +[Install] | ||
65 | +WantedBy=multi-user.target | ||
66 | -- | ||
67 | 2.4.0 | ||
68 | |||
diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb index 3d0b72e08d..37b37ae12f 100644 --- a/meta/recipes-extended/watchdog/watchdog_5.15.bb +++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb | |||
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569" | |||
10 | 10 | ||
11 | SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ |
12 | file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \ | 12 | file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \ |
13 | file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \ | ||
13 | file://watchdog-init.patch \ | 14 | file://watchdog-init.patch \ |
14 | file://watchdog-conf.patch \ | 15 | file://watchdog-conf.patch \ |
15 | file://wd_keepalive.init \ | 16 | file://wd_keepalive.init \ |
@@ -36,7 +37,9 @@ INITSCRIPT_PARAMS_${PN} = "start 15 1 2 3 4 5 . stop 85 0 6 ." | |||
36 | INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" | 37 | INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" |
37 | INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." | 38 | INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." |
38 | 39 | ||
39 | SYSTEMD_SERVICE_${PN} = "watchdog.service wd_keepalive.service" | 40 | SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" |
41 | SYSTEMD_SERVICE_${PN} = "watchdog.service" | ||
42 | SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service" | ||
40 | 43 | ||
41 | do_install_append() { | 44 | do_install_append() { |
42 | install -d ${D}${systemd_system_unitdir} | 45 | install -d ${D}${systemd_system_unitdir} |
@@ -54,6 +57,7 @@ PACKAGES =+ "${PN}-keepalive" | |||
54 | 57 | ||
55 | FILES_${PN}-keepalive = " \ | 58 | FILES_${PN}-keepalive = " \ |
56 | ${sysconfdir}/init.d/wd_keepalive \ | 59 | ${sysconfdir}/init.d/wd_keepalive \ |
60 | ${systemd_system_unitdir}/wd_keepalive.service \ | ||
57 | ${sbindir}/wd_keepalive \ | 61 | ${sbindir}/wd_keepalive \ |
58 | " | 62 | " |
59 | 63 | ||