#!/bin/sh
#
echo "Bringing up interface bnep0"
#
# Bring up network interface, give it a fixed IP address
#
ifconfig bnep0 up
ifconfig bnep0 192.168.100.1
#
# Kill dhcp daemon if still running
#
start-stop-daemon -K -x /usr/sbin/dhcpd
sleep 1
test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases	
start-stop-daemon -S -x /usr/sbin/dhcpd -- -q "bnep0" -cf /etc/dhcp/dhcpd.conf
