]> git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/init.d/dnsmasq
Noch zwei Netzwerkfixes...
[ipfire-2.x.git] / src / initscripts / init.d / dnsmasq
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/dnsmasq
4 #
5 # Description : dnsmasq init script
6 #
7 # Authors : Michael Tremer - mitch@ipfire.org
8 #
9 # Version : 01.00
10 #
11 # Notes :
12 #
13 ########################################################################
14
15 . /etc/sysconfig/rc
16 . ${rc_functions}
17
18 case "${1}" in
19 start)
20 boot_mesg "Starting Domain Name Service Proxy..."
21
22 eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
23 ARGS=
24 [ "$DOMAIN_NAME_GREEN" != "" ] && ARGS="-s $DOMAIN_NAME_GREEN "
25 [ -e "/var/ipfire/red/active" ] && ARGS+="-r /var/ipfire/red/resolv.conf"
26
27 loadproc /usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases $ARGS
28 ;;
29
30 stop)
31 boot_mesg "Stopping Domain Name Service Proxy..."
32 killproc /usr/sbin/dnsmasq
33 ;;
34
35 restart)
36 ${0} stop
37 sleep 1
38 ${0} start
39 ;;
40
41 status)
42 statusproc /usr/sbin/dnsmasq
43 ;;
44
45 *)
46 echo "Usage: ${0} {start|stop|restart|status}"
47 exit 1
48 ;;
49 esac
50
51 # End $rc_base/init.d/dnsmasq