summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gottinger <achim@gentoo.org>2001-07-10 05:28:53 +0000
committerAchim Gottinger <achim@gentoo.org>2001-07-10 05:28:53 +0000
commit08acb234f0eeb158bd69f575e4c2cd40ffc8116d (patch)
tree461a3e0d5201ce77a2d3eb6c47371e5759bcf849 /net-misc/dhcp/files
parent*** empty log message *** (diff)
downloadgentoo-2-08acb234f0eeb158bd69f575e4c2cd40ffc8116d.tar.gz
gentoo-2-08acb234f0eeb158bd69f575e4c2cd40ffc8116d.tar.bz2
gentoo-2-08acb234f0eeb158bd69f575e4c2cd40ffc8116d.zip
A basic dhcpd start script
Diffstat (limited to 'net-misc/dhcp/files')
-rwxr-xr-xnet-misc/dhcp/files/dhcp31
1 files changed, 31 insertions, 0 deletions
diff --git a/net-misc/dhcp/files/dhcp b/net-misc/dhcp/files/dhcp
new file mode 100755
index 000000000000..b23298be6cb2
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp
@@ -0,0 +1,31 @@
+#!/bin/sh
+#RCUPDATE:3 4:71:This line is required for script management
+
+source /etc/rc.d/config/functions
+
+SERVICE=dhcpd
+opts="start stop restart"
+
+EXE=/usr/sbin/dhcpd
+
+start() {
+ ebegin "Starting $SERVICE"
+ start-stop-daemon --start --quiet --exec $EXE -- eth0
+ eend $? "Started $SERVICE." "Error Starting $SERVICE."
+}
+
+stop() {
+ ebegin "Stopping $SERVICE"
+ start-stop-daemon --stop --quiet --exec $EXE
+ eend $? "Stopped $SERVICE." "Error Stopping $SERVICE."
+}
+
+restart() {
+
+ stop
+ start
+}
+
+doservice ${@}
+
+