| 1 |
#!/bin/sh |
#!/bin/mksh |
| 2 |
#FWINIT 50 |
#FWINIT 50 |
| 3 |
. /etc/rc.conf |
. /etc/rc.conf |
| 4 |
|
|
| 5 |
case $1 in |
case $1 in |
| 6 |
autostop) ;; |
(autostop) ;; |
| 7 |
autostart) |
(autostart) |
| 8 |
test x"${dns_dhcp:-NO}" = x"NO" && exit 0 |
[[ $dns_dhcp = NO ]] && exit 0 |
| 9 |
exec sh $0 start |
exec mksh $0 start |
| 10 |
;; |
;; |
| 11 |
start) |
start) |
| 12 |
[ -f /etc/dnsmasq.conf ] || exit |
[ -f /etc/dnsmasq.conf ] || exit |
| 13 |
/usr/sbin/dnsmasq |
/usr/sbin/dnsmasq |
| 14 |
;; |
;; |
| 15 |
stop) |
(stop) |
| 16 |
killall dnsmasq |
killall dnsmasq |
| 17 |
;; |
;; |
| 18 |
restart) |
(restart) |
| 19 |
sh $0 stop |
mksh $0 stop |
| 20 |
sh $0 start |
mksh $0 start |
| 21 |
;; |
;; |
| 22 |
*) |
(*) |
| 23 |
echo "Usage: $0 {start | stop | restart}" |
echo "Usage: $0 {start | stop | restart}" |
| 24 |
;; |
;; |
| 25 |
esac |
esac |
| 26 |
exit 0 |
exit $? |