#!/bin/sh PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11' BTADDR='00:18:AF:95:15:6E' IP=192.168.0.170 GW=192.168.0.1 NS=192.168.0.1 IFACE=bnep0 hciconfig hci0 up #insmod just to be sure insmod /mnt/initfs/lib/modules/current/bnep.ko #start PAN Bluetooth connection pand --connect $BTADDR # wait for the interface created by pand s=60 echo -n "Waiting $s secs for $IFACE" while [ $s -gt 0 ] ; do ifconfig $IFACE >/dev/null 2>&1 && break s=$((s-1)) echo -n "." sleep 1 done echo if ifconfig $IFACE >/dev/null 2>&1 ; then # bring it up echo "OK, bringing $IFACE up" ifconfig $IFACE $IP up route add default gw $GW echo "nameserver $NS" >/tmp/resolv.conf.lo else echo "Error: $IFACE not available." fi