summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johanson <latexer@gentoo.org>2003-06-18 02:30:32 +0000
committerPeter Johanson <latexer@gentoo.org>2003-06-18 02:30:32 +0000
commitf07cc193fde96e8f802168046b7c18472f409964 (patch)
tree50b42c08bf8587b3c4c67086dd72f13b2aef6984 /net-misc/dhcpv6/files
parentInitscript addition (diff)
downloadgentoo-2-f07cc193fde96e8f802168046b7c18472f409964.tar.gz
gentoo-2-f07cc193fde96e8f802168046b7c18472f409964.tar.bz2
gentoo-2-f07cc193fde96e8f802168046b7c18472f409964.zip
Initscript addition
Diffstat (limited to 'net-misc/dhcpv6/files')
-rw-r--r--net-misc/dhcpv6/files/dhcp6s.rc31
1 files changed, 31 insertions, 0 deletions
diff --git a/net-misc/dhcpv6/files/dhcp6s.rc b/net-misc/dhcpv6/files/dhcp6s.rc
new file mode 100644
index 000000000000..fa97e4c0d736
--- /dev/null
+++ b/net-misc/dhcpv6/files/dhcp6s.rc
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpv6/files/dhcp6s.rc,v 1.1 2003/06/18 02:30:28 latexer Exp $
+
+#configuration is done in /etc/dhcp6s.conf
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/dhcp6s.conf ] ; then
+ eerror "You need an /etc/dhcp6s.conf file to run dhcp6s"
+ eerror "There is a sample conf file in /usr/share/doc/dhcpv6-0.7"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting dhcp6s"
+ start-stop-daemon --start --quiet --exec /usr/sbin/dhcp6s
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dhcp6s"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/dhcp6s
+ eend $?
+}