* [PATCH][v4] watchdog: enable systemd support
@ 2016-08-10 2:18 jackie.huang
2016-09-12 2:26 ` Huang, Jie (Jackie)
0 siblings, 1 reply; 3+ messages in thread
From: jackie.huang @ 2016-08-10 2:18 UTC (permalink / raw)
To: openembedded-core
From: Roy Li <rongqing.li@windriver.com>
1. inherit systemd, and add two unit files which are from Fedora 23
2. auto load soft dog kernel module
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../watchdog/watchdog/watchdog-ping.service | 11 +++++++++++
meta/recipes-extended/watchdog/watchdog/watchdog.service | 11 +++++++++++
meta/recipes-extended/watchdog/watchdog_5.15.bb | 16 +++++++++++++++-
3 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog-ping.service
create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog.service
diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-ping.service b/meta/recipes-extended/watchdog/watchdog/watchdog-ping.service
new file mode 100644
index 0000000..44bac9d
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/watchdog-ping.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=watchdog daemon for use with ping test / network dependency
+After=network.target
+Conflicts=watchdog.service
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/watchdog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog.service b/meta/recipes-extended/watchdog/watchdog/watchdog.service
new file mode 100644
index 0000000..c5faa4e
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/watchdog.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=watchdog daemon
+# man systemd.special
+# auto added After=basic.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/watchdog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb
index ee1a893..7ff151c 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.15.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -12,6 +12,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
file://watchdog-init.patch \
file://watchdog-conf.patch \
+ file://watchdog-ping.service \
+ file://watchdog.service \
"
SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828"
@@ -21,7 +23,7 @@ UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
inherit autotools
-inherit update-rc.d
+inherit update-rc.d systemd
DEPENDS_append_libc-musl = " libtirpc "
CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
@@ -33,6 +35,18 @@ INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
RRECOMMENDS_${PN} = "kernel-module-softdog"
+SYSTEMD_SERVICE_${PN} = "watchdog.service"
+
do_install_append() {
install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/watchdog*.service ${D}${systemd_system_unitdir}
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${sysconfdir}/modules-load.d
+ echo "softdog" > ${D}${sysconfdir}/modules-load.d/softdog.conf
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/*.service
+ fi
}
+
+FILES_${PN} += "${systemd_system_unitdir}/*"
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH][v4] watchdog: enable systemd support
2016-08-10 2:18 [PATCH][v4] watchdog: enable systemd support jackie.huang
@ 2016-09-12 2:26 ` Huang, Jie (Jackie)
2016-09-12 5:18 ` Huang, Jie (Jackie)
0 siblings, 1 reply; 3+ messages in thread
From: Huang, Jie (Jackie) @ 2016-09-12 2:26 UTC (permalink / raw)
To: openembedded-core@lists.openembedded.org
Ping.
I don't see any rejection or comments on this but it's not merged yet, is it ignored?
Anyway, some later changes have been merged so I have to re-base this patch, v5 will be sent soon.
Thanks,
Jackie
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-
> bounces@lists.openembedded.org] On Behalf Of jackie.huang@windriver.com
> Sent: Wednesday, August 10, 2016 10:19 AM
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH][v4] watchdog: enable systemd support
>
> From: Roy Li <rongqing.li@windriver.com>
>
> 1. inherit systemd, and add two unit files which are from Fedora 23
> 2. auto load soft dog kernel module
>
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> ---
> .../watchdog/watchdog/watchdog-ping.service | 11 +++++++++++
> meta/recipes-extended/watchdog/watchdog/watchdog.service | 11 +++++++++++
> meta/recipes-extended/watchdog/watchdog_5.15.bb | 16 +++++++++++++++-
> 3 files changed, 37 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog-ping.service
> create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog.service
>
> diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-ping.service b/meta/recipes-
> extended/watchdog/watchdog/watchdog-ping.service
> new file mode 100644
> index 0000000..44bac9d
> --- /dev/null
> +++ b/meta/recipes-extended/watchdog/watchdog/watchdog-ping.service
> @@ -0,0 +1,11 @@
> +[Unit]
> +Description=watchdog daemon for use with ping test / network dependency
> +After=network.target
> +Conflicts=watchdog.service
> +
> +[Service]
> +Type=forking
> +ExecStart=@SBINDIR@/watchdog
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog.service b/meta/recipes-
> extended/watchdog/watchdog/watchdog.service
> new file mode 100644
> index 0000000..c5faa4e
> --- /dev/null
> +++ b/meta/recipes-extended/watchdog/watchdog/watchdog.service
> @@ -0,0 +1,11 @@
> +[Unit]
> +Description=watchdog daemon
> +# man systemd.special
> +# auto added After=basic.target
> +
> +[Service]
> +Type=forking
> +ExecStart=@SBINDIR@/watchdog
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-
> extended/watchdog/watchdog_5.15.bb
> index ee1a893..7ff151c 100644
> --- a/meta/recipes-extended/watchdog/watchdog_5.15.bb
> +++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb
> @@ -12,6 +12,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
> file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
> file://watchdog-init.patch \
> file://watchdog-conf.patch \
> + file://watchdog-ping.service \
> + file://watchdog.service \
> "
>
> SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828"
> @@ -21,7 +23,7 @@ UPSTREAM_CHECK_URI =
> "http://sourceforge.net/projects/watchdog/files/watchdog/"
> UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
>
> inherit autotools
> -inherit update-rc.d
> +inherit update-rc.d systemd
>
> DEPENDS_append_libc-musl = " libtirpc "
> CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
> @@ -33,6 +35,18 @@ INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
>
> RRECOMMENDS_${PN} = "kernel-module-softdog"
>
> +SYSTEMD_SERVICE_${PN} = "watchdog.service"
> +
> do_install_append() {
> install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
> + install -d ${D}${systemd_system_unitdir}
> + install -m 0644 ${WORKDIR}/watchdog*.service ${D}${systemd_system_unitdir}
> +
> + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
> + install -d ${D}${sysconfdir}/modules-load.d
> + echo "softdog" > ${D}${sysconfdir}/modules-load.d/softdog.conf
> + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/*.service
> + fi
> }
> +
> +FILES_${PN} += "${systemd_system_unitdir}/*"
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH][v4] watchdog: enable systemd support
2016-09-12 2:26 ` Huang, Jie (Jackie)
@ 2016-09-12 5:18 ` Huang, Jie (Jackie)
0 siblings, 0 replies; 3+ messages in thread
From: Huang, Jie (Jackie) @ 2016-09-12 5:18 UTC (permalink / raw)
To: openembedded-core@lists.openembedded.org
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-
> bounces@lists.openembedded.org] On Behalf Of Huang, Jie (Jackie)
> Sent: Monday, September 12, 2016 10:27 AM
> To: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH][v4] watchdog: enable systemd support
>
> Ping.
>
> I don't see any rejection or comments on this but it's not merged yet, is it ignored?
>
> Anyway, some later changes have been merged so I have to re-base this patch, v5 will be sent soon.
v5 is sent.
Thanks,
Jackie
>
> Thanks,
> Jackie
>
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-
> > bounces@lists.openembedded.org] On Behalf Of jackie.huang@windriver.com
> > Sent: Wednesday, August 10, 2016 10:19 AM
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH][v4] watchdog: enable systemd support
> >
> > From: Roy Li <rongqing.li@windriver.com>
> >
> > 1. inherit systemd, and add two unit files which are from Fedora 23
> > 2. auto load soft dog kernel module
> >
> > Signed-off-by: Roy Li <rongqing.li@windriver.com>
> > Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> > ---
> > .../watchdog/watchdog/watchdog-ping.service | 11 +++++++++++
> > meta/recipes-extended/watchdog/watchdog/watchdog.service | 11 +++++++++++
> > meta/recipes-extended/watchdog/watchdog_5.15.bb | 16 +++++++++++++++-
> > 3 files changed, 37 insertions(+), 1 deletion(-)
> > create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog-ping.service
> > create mode 100644 meta/recipes-extended/watchdog/watchdog/watchdog.service
> >
> > diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-ping.service b/meta/recipes-
> > extended/watchdog/watchdog/watchdog-ping.service
> > new file mode 100644
> > index 0000000..44bac9d
> > --- /dev/null
> > +++ b/meta/recipes-extended/watchdog/watchdog/watchdog-ping.service
> > @@ -0,0 +1,11 @@
> > +[Unit]
> > +Description=watchdog daemon for use with ping test / network dependency
> > +After=network.target
> > +Conflicts=watchdog.service
> > +
> > +[Service]
> > +Type=forking
> > +ExecStart=@SBINDIR@/watchdog
> > +
> > +[Install]
> > +WantedBy=multi-user.target
> > diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog.service b/meta/recipes-
> > extended/watchdog/watchdog/watchdog.service
> > new file mode 100644
> > index 0000000..c5faa4e
> > --- /dev/null
> > +++ b/meta/recipes-extended/watchdog/watchdog/watchdog.service
> > @@ -0,0 +1,11 @@
> > +[Unit]
> > +Description=watchdog daemon
> > +# man systemd.special
> > +# auto added After=basic.target
> > +
> > +[Service]
> > +Type=forking
> > +ExecStart=@SBINDIR@/watchdog
> > +
> > +[Install]
> > +WantedBy=multi-user.target
> > diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-
> > extended/watchdog/watchdog_5.15.bb
> > index ee1a893..7ff151c 100644
> > --- a/meta/recipes-extended/watchdog/watchdog_5.15.bb
> > +++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb
> > @@ -12,6 +12,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
> > file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
> > file://watchdog-init.patch \
> > file://watchdog-conf.patch \
> > + file://watchdog-ping.service \
> > + file://watchdog.service \
> > "
> >
> > SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828"
> > @@ -21,7 +23,7 @@ UPSTREAM_CHECK_URI =
> > "http://sourceforge.net/projects/watchdog/files/watchdog/"
> > UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
> >
> > inherit autotools
> > -inherit update-rc.d
> > +inherit update-rc.d systemd
> >
> > DEPENDS_append_libc-musl = " libtirpc "
> > CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
> > @@ -33,6 +35,18 @@ INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
> >
> > RRECOMMENDS_${PN} = "kernel-module-softdog"
> >
> > +SYSTEMD_SERVICE_${PN} = "watchdog.service"
> > +
> > do_install_append() {
> > install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
> > + install -d ${D}${systemd_system_unitdir}
> > + install -m 0644 ${WORKDIR}/watchdog*.service ${D}${systemd_system_unitdir}
> > +
> > + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
> > + install -d ${D}${sysconfdir}/modules-load.d
> > + echo "softdog" > ${D}${sysconfdir}/modules-load.d/softdog.conf
> > + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/*.service
> > + fi
> > }
> > +
> > +FILES_${PN} += "${systemd_system_unitdir}/*"
> > --
> > 2.7.4
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-12 5:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10 2:18 [PATCH][v4] watchdog: enable systemd support jackie.huang
2016-09-12 2:26 ` Huang, Jie (Jackie)
2016-09-12 5:18 ` Huang, Jie (Jackie)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox