source: bootscripts-standard/cblfs/init.d/dhcp@ 77aff82

Last change on this file since 77aff82 was 3164f4b, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Default the dhcp bootscript to eth0 with the ability to override with DHCP_ARGS setin /etc/sysconfig/dhcp.

  • Property mode set to 100644
File size: 769 bytes
Line 
1#!/bin/bash
2# Begin $rc_base/init.d/dhcp
3
4# Based on sysklogd script from LFS-3.1 and earlier.
5# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
6
7#$LastChangedBy: bdubbs $
8#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
9
10. /etc/sysconfig/rc
11. $rc_functions
12. /etc/sysconfig/dhcp
13
14case "$1" in
15 start)
16 boot_mesg "Starting DHCP Server..."
17 loadproc /usr/sbin/dhcpd ${DHCP_ARGS--q eth0}
18 ;;
19
20 stop)
21 boot_mesg "Stopping DHCP Server..."
22 killproc /usr/sbin/dhcpd
23 ;;
24
25 reload)
26 boot_mesg "Reloading DHCP Server..."
27 reloadproc /usr/sbin/dhcpd
28 ;;
29
30 restart)
31 $0 stop
32 sleep 1
33 $0 start
34 ;;
35
36 status)
37 statusproc /usr/sbin/dhcpd
38 ;;
39
40 *)
41 echo "Usage: $0 {start|stop|reload|restart|status}"
42 exit 1
43 ;;
44esac
45
46# End $rc_base/init.d/dhcp
Note: See TracBrowser for help on using the repository browser.