diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-05 17:45:38 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-05 17:46:21 +0200 |
commit | 24cff32974dee2579d7e785d450ed180a4ef0171 (patch) | |
tree | 748a194adf798df8e652ade959546ceb098b2aab /testing/mdevd | |
parent | 5333ec4645d3267e2a9169d5b16a562055e23987 (diff) | |
download | aports-24cff32974dee2579d7e785d450ed180a4ef0171.tar.bz2 aports-24cff32974dee2579d7e785d450ed180a4ef0171.tar.xz |
testing/mdevd: add runscript
Diffstat (limited to 'testing/mdevd')
-rw-r--r-- | testing/mdevd/APKBUILD | 10 | ||||
-rw-r--r-- | testing/mdevd/mdevd.initd | 33 |
2 files changed, 40 insertions, 3 deletions
diff --git a/testing/mdevd/APKBUILD b/testing/mdevd/APKBUILD index 74f3be3543..4845a01ae2 100644 --- a/testing/mdevd/APKBUILD +++ b/testing/mdevd/APKBUILD @@ -13,8 +13,9 @@ arch="all" license="ISC" options="!check" # no tests provided makedepends="linux-headers skalibs-dev" -subpackages="$pkgname-doc" -source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz" +subpackages="$pkgname-doc $pkgname-openrc" +source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz + $pkgname.initd" builddir="$srcdir/$pkgname-$pkgver" build() { @@ -34,6 +35,9 @@ package() { mkdir -p "$pkgdir"/usr/share/doc cp -a doc "$pkgdir"/usr/share/doc/$pkgname + + install -D -m 755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname } -sha512sums="c2260a90bc99f468ed4f8de06982fdae12bae50f25e3be0c593311b0d5e856d00aca3768fac84089a13065330aa92b21f8e1304dd6d46d76e81e2f0f20f17b3e mdevd-0.1.0.1.tar.gz" +sha512sums="c2260a90bc99f468ed4f8de06982fdae12bae50f25e3be0c593311b0d5e856d00aca3768fac84089a13065330aa92b21f8e1304dd6d46d76e81e2f0f20f17b3e mdevd-0.1.0.1.tar.gz +0b52af599d73abba8033498c5449c82f22ab2e8ecdfaa58c5ce112604e3e9eb3ce179930891173b41026e11494a6c2e5a6cd7504853ca96beb7ff8ea3754341a mdevd.initd" diff --git a/testing/mdevd/mdevd.initd b/testing/mdevd/mdevd.initd new file mode 100644 index 0000000000..a9feeea154 --- /dev/null +++ b/testing/mdevd/mdevd.initd @@ -0,0 +1,33 @@ +#!/sbin/openrc-run + +extra_started_commands="reload" +description="A netlink-listening device manager similar to mdev" +description_reload="Reload the configuration file" + +: ${cfgfile:="/etc/mdev.conf"} +: ${logfile:="/var/log/$RC_SVCNAME.log"} + +pidfile="/run/$RC_SVCNAME.pid" +required_files="$cfgfile" + +command="/bin/mdevd" +command_args="-f $cfgfile ${command_args:-}" +command_background="yes" +start_stop_daemon_args="--stdout $logfile --stderr $logfile" + +depend() { + provide dev + need sysfs dev-mount + before checkfs fsck + keyword -containers -lxc -vserver +} + +start_pre() { + mkdir -p /dev +} + +reload() { + ebegin "Reloading $name configuration" + start-stop-daemon --signal HUP --pidfile "$pidfile" + eend $? +} |