d01c5096f1
file I cleaned up the patch so line do not overflow and removed some white space in hope to get it accepted or revised. As isc-dhcp-relay does not come with an init script, I made one based on sysntpd init.d file for both ipv4 and ipv6. If you need more arguments from isc-dhcp-relay to be included in the config file, I'll be able to add them. This patch has been applied to trunk and compiles/install on my side. The script for ipv4 and ipv6 have been tested with the isc-dhcp-relay-ipv6 binary and work well (start/stop with the right settings). Signed-off-by: Jérôme Poulin <jeromepoulin@gmail.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/packages@34485 3c298f89-4303-0410-b956-a3cf2f4a3e73
23 lines
404 B
Bash
23 lines
404 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2012 OpenWrt.org
|
|
|
|
START=91
|
|
|
|
SERVICE_SIG="KILL"
|
|
SERVICE_PID_FILE="/var/run/dhcrelay4.pid"
|
|
SERVICE_USE_PID=1
|
|
|
|
start() {
|
|
local relay_dhcpserver
|
|
|
|
config_load dhcrelay
|
|
config_get relay_dhcpserver ipv4 dhcpserver
|
|
|
|
service_start /usr/sbin/dhcrelay -4 -q \
|
|
-pf $SERVICE_PID_FILE $relay_dhcpserver
|
|
}
|
|
|
|
stop() {
|
|
service_stop /usr/sbin/dhcrelay
|
|
}
|