1*4882a593SmuzhiyunSUMMARY = "Software watchdog" 2*4882a593SmuzhiyunDESCRIPTION = "Watchdog is a daemon that checks if your system is still \ 3*4882a593Smuzhiyunworking. If programs in user space are not longer executed \ 4*4882a593Smuzhiyunit will reboot the system." 5*4882a593SmuzhiyunHOMEPAGE = "http://watchdog.sourceforge.net/" 6*4882a593SmuzhiyunBUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunLICENSE = "GPL-2.0-or-later" 9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=084236108b1d4a9851bf5213fea586fd" 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunSRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ 12*4882a593Smuzhiyun file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \ 13*4882a593Smuzhiyun file://watchdog.init \ 14*4882a593Smuzhiyun file://wd_keepalive.init \ 15*4882a593Smuzhiyun file://0001-wd_keepalive.service-use-run-instead-of-var-run.patch \ 16*4882a593Smuzhiyun file://0001-shutdown-Do-not-guard-sys-quota.h-sys-swap.h-and-sys.patch \ 17*4882a593Smuzhiyun" 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunSRC_URI[md5sum] = "1b4f51cabc64d1bee2fce7cdd626831f" 20*4882a593SmuzhiyunSRC_URI[sha256sum] = "b8e7c070e1b72aee2663bdc13b5cc39f76c9232669cfbb1ac0adc7275a3b019d" 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun# Can be dropped when the output next changes, avoids failures after 23*4882a593Smuzhiyun# reproducibility issues 24*4882a593SmuzhiyunPR = "r1" 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunUPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" 27*4882a593SmuzhiyunUPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" 28*4882a593Smuzhiyun 29*4882a593Smuzhiyuninherit autotools update-rc.d systemd pkgconfig 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunDEPENDS += "libtirpc" 32*4882a593SmuzhiyunCFLAGS += "-I${STAGING_INCDIR}/tirpc" 33*4882a593SmuzhiyunLDFLAGS += "-ltirpc" 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunEXTRA_OECONF += " --disable-nfs " 36*4882a593SmuzhiyunCACHED_CONFIGUREVARS += "ac_cv_path_PATH_SENDMAIL=${sbindir}/sendmail" 37*4882a593Smuzhiyun 38*4882a593SmuzhiyunINITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunINITSCRIPT_NAME:${PN} = "watchdog" 41*4882a593SmuzhiyunINITSCRIPT_PARAMS:${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ." 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunINITSCRIPT_NAME:${PN}-keepalive = "wd_keepalive" 44*4882a593SmuzhiyunINITSCRIPT_PARAMS:${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ." 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunSYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" 47*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "watchdog.service" 48*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN}-keepalive = "wd_keepalive.service" 49*4882a593Smuzhiyun# When using systemd, consider making use of internal watchdog support of systemd. 50*4882a593Smuzhiyun# See RuntimeWatchdogSec in /etc/systemd/system.conf. 51*4882a593SmuzhiyunSYSTEMD_AUTO_ENABLE = "disable" 52*4882a593Smuzhiyun 53*4882a593Smuzhiyundo_install:append() { 54*4882a593Smuzhiyun install -d ${D}${systemd_system_unitdir} 55*4882a593Smuzhiyun install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir} 56*4882a593Smuzhiyun install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir} 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog 59*4882a593Smuzhiyun install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun # watchdog.conf is provided by the watchdog-config recipe 62*4882a593Smuzhiyun rm ${D}${sysconfdir}/watchdog.conf 63*4882a593Smuzhiyun} 64*4882a593Smuzhiyun 65*4882a593SmuzhiyunPACKAGES =+ "${PN}-keepalive" 66*4882a593Smuzhiyun 67*4882a593SmuzhiyunFILES:${PN}-keepalive = " \ 68*4882a593Smuzhiyun ${sysconfdir}/init.d/wd_keepalive \ 69*4882a593Smuzhiyun ${systemd_system_unitdir}/wd_keepalive.service \ 70*4882a593Smuzhiyun ${sbindir}/wd_keepalive \ 71*4882a593Smuzhiyun" 72*4882a593Smuzhiyun 73*4882a593SmuzhiyunRDEPENDS:${PN} += "${PN}-config" 74*4882a593SmuzhiyunRRECOMMENDS:${PN} += "kernel-module-softdog" 75*4882a593Smuzhiyun 76*4882a593SmuzhiyunRDEPENDS:${PN}-keepalive += "${PN}-config" 77*4882a593SmuzhiyunRCONFLICTS:${PN}-keepalive += "${PN}" 78*4882a593SmuzhiyunRRECOMMENDS:${PN}-keepalive += "kernel-module-softdog" 79