The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / dhcp / S80dhcp-server
1 #!/bin/sh
2 #
3 # $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
4 #
5
6 # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
7 #       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
8 INTERFACES=""
9
10 # Sanity checks
11 test -f /usr/sbin/dhcpd || exit 0
12 test -f /etc/dhcp/dhcpd.conf || exit 0
13 test -n "$INTERFACES" || exit 0
14
15 case "$1" in
16         start)
17                 echo -n "Starting DHCP server: "
18                 test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
19                 test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases
20                 start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
21                 [ $? = 0 ] && echo "OK" || echo "FAIL"
22                 ;;
23         stop)
24                 echo -n "Stopping DHCP server: dhcpd3"
25                 start-stop-daemon -K -x /usr/sbin/dhcpd
26                 [ $? = 0 ] && echo "OK" || echo "FAIL"
27                 ;;
28         restart | force-reload)
29                 $0 stop
30                 sleep 2
31                 $0 start
32                 if [ "$?" != "0" ]; then
33                         exit 1
34                 fi
35                 ;;
36         *)
37                 echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"
38                 exit 1
39 esac
40
41 exit 0