aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-03-14 20:28:59 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-03-14 20:28:59 -0400
commit322a3eb0e1266fb31e8a3f4c11bb1a64bbf624d6 (patch)
tree359f55d89b5a364e9adbe2539855a991fe00b091 /sys-apps/watchdog
parentdev-libs/nspr: in tree version 4.12 works (diff)
downloadmusl-322a3eb0e1266fb31e8a3f4c11bb1a64bbf624d6.tar.gz
musl-322a3eb0e1266fb31e8a3f4c11bb1a64bbf624d6.tar.bz2
musl-322a3eb0e1266fb31e8a3f4c11bb1a64bbf624d6.zip
sys-apps/watchdog: no longer in tree, needed for bug #544476
Diffstat (limited to 'sys-apps/watchdog')
-rw-r--r--sys-apps/watchdog/Manifest6
-rw-r--r--sys-apps/watchdog/files/watchdog-conf.d6
-rw-r--r--sys-apps/watchdog/files/watchdog-init.d48
-rw-r--r--sys-apps/watchdog/files/watchdog.service10
-rw-r--r--sys-apps/watchdog/metadata.xml14
-rw-r--r--sys-apps/watchdog/watchdog-5.13-r1.ebuild38
6 files changed, 122 insertions, 0 deletions
diff --git a/sys-apps/watchdog/Manifest b/sys-apps/watchdog/Manifest
new file mode 100644
index 00000000..6b2cef21
--- /dev/null
+++ b/sys-apps/watchdog/Manifest
@@ -0,0 +1,6 @@
+AUX watchdog-conf.d 165 SHA256 ab86be631bae5f81ee60f1602d5f663bdc15381423197a9aaceea3c8c9861c9c SHA512 bb5da9f7161ff6b7d3b8079a3e81bd9f7ecf6055cd5a32cc599e8bbeccf73672361995f6271129059cd31d4c4f8062686020cc527ae374a17209b8b107098a21 WHIRLPOOL 7c03971bf42276db6121f9f051c9c52d420da23b7e88b60ecd0f4932233ab0507a0be8a4eb4eec232bd21c3e6793127b132e40786d95a98bf277ec60d1cca0c4
+AUX watchdog-init.d 867 SHA256 df1cde25f871e7b728e9fd764210d7ead1b051556e1c90b70217f6f5f9024e71 SHA512 d61fd3aae075058f65de72e6810c6e07902948d4cf4b577e742c6cbd64eba3231b048c5e9b33349a795fb8c9bbd2ce5b0a93e6abf8845bc32b8952c0950e536b WHIRLPOOL a78665a3b229469946993feb23fa3473da71826ce2fd31b13129f5fb2239acf67ebfc5dedc9a74e3dc2268a2e6ef1cc3e2af9188e879dc3cca47b0aa3ae33305
+AUX watchdog.service 146 SHA256 91b021d969dcdf9d87f24c01f88da4dccae5a6697306231e04fe474b8fbe4500 SHA512 5eb489e72351db8a881d84fc15730a91ca2a108641031196ad5374aec5e01fa5b859872fa27c3382b4637482a5c8dab7efa61057f4663ae6c49c4ed01e9d8abd WHIRLPOOL ffd1c299b12059407f376f646998708a78aa480cac83f384bd81017d6eada423e7cf4a0689ef2c626eec7bd950e2f4dbd4bcbea4c24e9357a3cf5d050808e000
+DIST watchdog-5.13.tar.gz 201202 SHA256 141e0faf3ee4d8187a6ff4e00b18ef7b7a4ce432a2d4c8a6e6fdc62507fc6eb0 SHA512 ff68bc748446c060c86362105013d3ccf741e165d497d743a986d2dd28027e0290c83a67317d603d095a5d79c840991224aaa31b1bd2b66f6e858d3a35536d1f WHIRLPOOL 00c511d4a66d6adc3ad499b9348837261d672088527637db9a0b535550a3ce5cdf2b8fdf2a05ac039fb9111c81b8e9578dceddf759de418d305d5ffddf257584
+EBUILD watchdog-5.13-r1.ebuild 875 SHA256 6239dbdc51f6bc1658d17e9ae8563a5857c2cc12aed1609563566335ea995245 SHA512 b7989a587cc09d442536cdc32088e44ebede20e8d11b661955d78bb6d3322639fa105d05473a7ee71674f2ffd710d74d68845e86309938fe851f2b5db170c4cc WHIRLPOOL 8a85a912f0b30ae0ffc7eef86a8a1d6c99b628b306c14cf1997ac57f3b15b205799b71ab4aab5fefa201b4a0ca70421b8d464cc281598dc36845b8c58882670b
+MISC metadata.xml 405 SHA256 df8b3f543f03f2448f223bdc8555d159448a5f111f21ee74db2ae213e3ad275e SHA512 36da0e0199b41608190b0e39de2b82bea5516890208c57744b93e527904501de01b1bfd4e20fc74450bd7b9ac4d152e0d57e31a35deca0b1edddc9ce60846d0b WHIRLPOOL 88b9d34283d0ebe4d570cc6062e375998f5687b1f33ac1e93476b7c9e27763670a671a1a7488b2a9b04f2ba23722ddae446064436bcdeb9d1c2f5501d992e0b6
diff --git a/sys-apps/watchdog/files/watchdog-conf.d b/sys-apps/watchdog/files/watchdog-conf.d
new file mode 100644
index 00000000..60c7843d
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-conf.d
@@ -0,0 +1,6 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# for more info, see watchdog(8)
+WATCHDOG_OPTS=""
diff --git a/sys-apps/watchdog/files/watchdog-init.d b/sys-apps/watchdog/files/watchdog-init.d
new file mode 100644
index 00000000..fdfe66b9
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-init.d
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+ use logger
+}
+
+get_config() {
+ set -- ${WATCHDOG_OPTS}
+ while [ -n "$1" ] ; do
+ if [ "$1" = "-c" -o "$1" = "--config-file" ] ; then
+ echo $2
+ return
+ fi
+ shift
+ done
+ echo /etc/watchdog.conf
+}
+
+get_delay() {
+ # man this is fugly
+ sed -n \
+ -e '1{x;s:.*:10:;x}' \
+ -e 's:#.*::' \
+ -e 's:^[[:space:]]*::' \
+ -e '/^interval/{s:.*=::;h}' \
+ -e '${g;p}' \
+ $(get_config)
+}
+
+start() {
+ ebegin "Starting watchdog"
+ start-stop-daemon --start \
+ --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
+ -- ${WATCHDOG_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping watchdog"
+ start-stop-daemon --stop \
+ --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
+ --retry $(get_delay)
+ eend $?
+}
diff --git a/sys-apps/watchdog/files/watchdog.service b/sys-apps/watchdog/files/watchdog.service
new file mode 100644
index 00000000..9ec1076e
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=watchdog daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/watchdog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/watchdog/metadata.xml b/sys-apps/watchdog/metadata.xml
new file mode 100644
index 00000000..36ad6a68
--- /dev/null
+++ b/sys-apps/watchdog/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="nfs">enable support for checking nfs mounts</flag>
+</use>
+<upstream>
+ <remote-id type="sourceforge">watchdog</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/watchdog/watchdog-5.13-r1.ebuild b/sys-apps/watchdog/watchdog-5.13-r1.ebuild
new file mode 100644
index 00000000..b79ee95d
--- /dev/null
+++ b/sys-apps/watchdog/watchdog-5.13-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs flag-o-matic systemd
+
+DESCRIPTION="A software watchdog and /dev/watchdog daemon"
+HOMEPAGE="http://sourceforge.net/projects/watchdog/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm m68k ~mips ppc s390 sh ~sparc x86"
+IUSE="nfs"
+
+DEPEND="nfs? ( net-libs/libtirpc )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ if use nfs ; then
+ tc-export PKG_CONFIG
+ append-cppflags $(${PKG_CONFIG} libtirpc --cflags)
+ export LIBS+=" $(${PKG_CONFIG} libtirpc --libs)"
+ fi
+ econf $(use_enable nfs)
+}
+
+src_install() {
+ default
+ docinto examples
+ dodoc examples/*
+
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+ systemd_dounit "${FILESDIR}"/watchdog.service
+}