slitaz-tools rev 484

hwsetup: improve bluetooth and non-free option
author Rohit Joshi <jozee@slitaz.org>
date Thu Apr 08 20:33:25 2010 +0000 (2010-04-08)
parents b9d6127a5b8a
children 76859e44a67f
files tinyutils/hwsetup
line diff
     1.1 --- a/tinyutils/hwsetup	Wed Apr 07 21:47:02 2010 +0200
     1.2 +++ b/tinyutils/hwsetup	Thu Apr 08 20:33:25 2010 +0000
     1.3 @@ -71,7 +71,7 @@
     1.4  			GROUP="camera lp"
     1.5  			;;
     1.6  		bluetooth)
     1.7 -			DEPENDS="$DEPENDS bluez usbutils hal-info"
     1.8 +			DEPENDS="$DEPENDS bluez usbutils hal-info pygobject dbus-python"
     1.9  			SUGGESTED=""
    1.10  			GROUP="lp"
    1.11  			;;	
    1.12 @@ -587,7 +587,6 @@
    1.13  		    fi 
    1.14  		    ;;
    1.15  		bluetooth) 
    1.16 -			untested
    1.17  			load_modules
    1.18  			udev
    1.19  					
    1.20 @@ -603,20 +602,21 @@
    1.21  				echo ""
    1.22  				lsusb | grep Bluetooth
    1.23  				# udev should run bluetoothd automatically
    1.24 -				#/usr/sbin/bluetoothd 
    1.25 -				hciconfig -a
    1.26 -				hcitool dev
    1.27 -				hcitool scan
    1.28 -				echo "========================================"	
    1.29 -				echo -e "Following \033[1m Bluetooth commands \033[0m  may be of help "
    1.30 -				echo ""
    1.31 -				echo " modprobe btusb"
    1.32 -				echo " /usr/sbin/bluetoothd -nd #for starting bluetooth daemon"
    1.33 -				echo " hciconfig -a"
    1.34 -				echo " \"hcitool dev\" : checking local bluetooth devices..."				
    1.35 -		 		echo " \"hcitool scan\" : scanning remote bluetooth devices..."		 		
    1.36 -		 		echo -e " You can manually edit the configuration files in \033[1m /etc/bluetooth \033[0m if need be"
    1.37 -				echo "========================================"	
    1.38 +				bluetoothd 
    1.39 +				sleep 1
    1.40 +				if hcitool dev | grep -q hci ; then
    1.41 +					echo "========================================"	
    1.42 +					echo -e "Following \033[1m Bluetooth commands \033[0m  may be of help "
    1.43 +					echo ""
    1.44 +					#echo " modprobe btusb"
    1.45 +					#echo " /usr/sbin/bluetoothd -nd #for starting bluetooth daemon"
    1.46 +					echo " hciconfig -a"
    1.47 +					echo " \"hcitool dev\" : checking local bluetooth devices..."				
    1.48 +		 			echo " \"hcitool scan\" : scanning remote bluetooth devices..."	
    1.49 +		 			echo " \"bluez-simple-agent\" : pairing with remote bluetooth devices..."	 		
    1.50 +		 			echo -e " You can manually edit the configuration files in \033[1m /etc/bluetooth \033[0m if need be"
    1.51 +					echo "========================================"	
    1.52 +				fi
    1.53  			else
    1.54  				echo ""
    1.55  				echo "========================================"	
    1.56 @@ -629,6 +629,7 @@
    1.57  				# Show if the bluetooth is detected
    1.58  		 		echo " hcitool dev # for checking local devices"
    1.59  		 		echo " hcitool scan # for scanning remote devices"
    1.60 +		 		echo " bluez-simple-agent # pairing with remote bluetooth devices"	
    1.61  		 		echo ""
    1.62  		 		echo -e " You can manually edit the configuration files in \033[1m /etc/bluetooth \033[0m if need be"
    1.63  				echo ""			
    1.64 @@ -824,9 +825,8 @@
    1.65  		
    1.66  			device
    1.67  			#untested
    1.68 -			
    1.69 -			if [ "$NON_FREE" == "yes" ]; then 
    1.70 -			    DEPENDS="$NON_FREE_DEPENDS" 				
    1.71 +			if [ ! "$NON_FREE_DEPENDS" == "" -a "$NON_FREE" == "yes" ]; then 
    1.72 +			     DEPENDS="$NON_FREE_DEPENDS" 				
    1.73  			fi
    1.74  
    1.75  			if [ "$AUTO_INSTALL_SUGGESTED" == "yes" ]; then