diff options
author | Nicolas Thill <nico@openwrt.org> | 2005-04-11 01:36:13 +0000 |
---|---|---|
committer | Nicolas Thill <nico@openwrt.org> | 2005-04-11 01:36:13 +0000 |
commit | 216f5af5bec8d18fa1ff82ad90d2393c6c358958 (patch) | |
tree | b6e1517b88574ab7f13b78545cf1b04e2d49be62 /openwrt/package/dhcp-forwarder/dhcp-forwarder.init | |
parent | 435c5a51f570b29977a76cfd201720e30f54032c (diff) | |
download | mtk-20170518-216f5af5bec8d18fa1ff82ad90d2393c6c358958.zip mtk-20170518-216f5af5bec8d18fa1ff82ad90d2393c6c358958.tar.gz mtk-20170518-216f5af5bec8d18fa1ff82ad90d2393c6c358958.tar.bz2 |
Change dhcp-forwarder to experimental coding style
SVN-Revision: 626
Diffstat (limited to 'openwrt/package/dhcp-forwarder/dhcp-forwarder.init')
-rw-r--r-- | openwrt/package/dhcp-forwarder/dhcp-forwarder.init | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/openwrt/package/dhcp-forwarder/dhcp-forwarder.init b/openwrt/package/dhcp-forwarder/dhcp-forwarder.init new file mode 100644 index 0000000..6ad3858 --- /dev/null +++ b/openwrt/package/dhcp-forwarder/dhcp-forwarder.init @@ -0,0 +1,21 @@ +#!/bin/sh + +LOG_D=/var/log +RUN_D=/var/run +PID_F=$RUN_D/dhcpd-fwd.pid + +case $1 in + start) + [ -d $LOG_D ] || mkdir -p $LOG_D + [ -d $RUN_D ] || mkdir -p $RUN_D + dhcp-fwd + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac + +exit $? |