[packages] dhcp: rename to isc-dhcp and fix ipv6 support
git-svn-id: svn://svn.openwrt.org/openwrt/packages@32897 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
33
net/isc-dhcp/files/dhcpd.init
Normal file
33
net/isc-dhcp/files/dhcpd.init
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=65
|
||||
|
||||
lease_file=/var/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
|
||||
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user