From 7f594309bfcc18db17a7214eed0f63f3d1bb2e59 Mon Sep 17 00:00:00 2001 From: Antony Antony Date: Fri, 25 Mar 2016 13:17:46 +0100 Subject: isc-dhcp: update to 4.3.3. Migrate from oldplackages Signed-off-by: Antony Antony --- net/isc-dhcp/files/dhcpd.init | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 net/isc-dhcp/files/dhcpd.init (limited to 'net/isc-dhcp/files/dhcpd.init') diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init new file mode 100644 index 000000000..3ca6c641e --- /dev/null +++ b/net/isc-dhcp/files/dhcpd.init @@ -0,0 +1,33 @@ +#!/bin/sh /etc/rc.common + +START=65 + +lease_file=/tmp/dhcpd.leases +config_file=/etc/dhcpd.conf +pid_file=/var/run/dhcpd.pid + +start() { + if [ ! -e $lease_file ]; then + touch $lease_file + fi + + /usr/sbin/dhcpd -q -cf $config_file -lf $lease_file -pf $pid_file $dhcp_ifs + + if [ $? -ne 0 ]; then + return 1 + fi +} + +stop() { + if [ ! -e $pid_file ]; then + return 1 + fi + + kill -9 `cat $pid_file` + + if [ $? -ne 0 ]; then + return 1 + fi + + rm $pid_file +} -- cgit v1.2.3