* [gentoo-commits] proj/betagarden:master commit in: app-misc/memlockd/, app-misc/memlockd/files/
@ 2011-03-21 0:11 Sebastian Pipping
0 siblings, 0 replies; only message in thread
From: Sebastian Pipping @ 2011-03-21 0:11 UTC (permalink / raw
To: gentoo-commits
commit: 5a680e76827c8eb821f43efe79af5348fc84cec1
Author: Sebastian Pipping <sebastian <AT> pipping <DOT> org>
AuthorDate: Mon Mar 21 00:10:42 2011 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Mon Mar 21 00:10:42 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=5a680e76
app-misc/memlockd: Add init script
---
app-misc/memlockd/files/memlockd | 33 ++++++++++++++++++++
...{memlockd-1.0.ebuild => memlockd-1.0-r1.ebuild} | 2 +-
2 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/app-misc/memlockd/files/memlockd b/app-misc/memlockd/files/memlockd
new file mode 100755
index 0000000..0a9e10d
--- /dev/null
+++ b/app-misc/memlockd/files/memlockd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.rc,v 1.24 2010/07/18 21:53:24 vapier Exp $
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ if [ ! -f /etc/memlockd.cfg ] ; then
+ eerror "Please create /etc/memlockd.cfg"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting memlockd"
+ start-stop-daemon --start --exec /usr/sbin/memlockd \
+ --pidfile /var/run/memlockd.pid
+ eend $? "Failed to start memlockd"
+}
+
+stop() {
+ ebegin "Stopping memlockd"
+ start-stop-daemon --stop \
+ --pidfile /var/run/memlockd.pid \
+ --exec /usr/sbin/memlockd
+ eend $? "Failed to stop memlockd"
+}
diff --git a/app-misc/memlockd/memlockd-1.0.ebuild b/app-misc/memlockd/memlockd-1.0-r1.ebuild
similarity index 94%
rename from app-misc/memlockd/memlockd-1.0.ebuild
rename to app-misc/memlockd/memlockd-1.0-r1.ebuild
index 50a709a..16e7f53 100644
--- a/app-misc/memlockd/memlockd-1.0.ebuild
+++ b/app-misc/memlockd/memlockd-1.0-r1.ebuild
@@ -26,5 +26,5 @@ src_install() {
dosbin memlockd || die
- # TODO: add custom init script
+ doinitd "${FILESDIR}"/${PN} || die
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-21 0:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-21 0:11 [gentoo-commits] proj/betagarden:master commit in: app-misc/memlockd/, app-misc/memlockd/files/ Sebastian Pipping
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox