Remove bluetooth
This commit is contained in:
parent
bc6f387506
commit
cb87c06f90
|
@ -113,6 +113,29 @@ function detect_usb_drive {
|
|||
write_config_param USB_DRIVE "$USB_DRIVE"
|
||||
}
|
||||
|
||||
function remove_bluetooth {
|
||||
rmmod -f bnep
|
||||
rmmod -f bluetooth
|
||||
if [ -f /etc/default/bluetooth ]; then
|
||||
if grep "BLUETOOTH_ENABLED=" /etc/default/bluetooth; then
|
||||
sed -i 's|BLUETOOTH_ENABLED=.*|BLUETOOTH_ENABLED=0|g' /etc/default/bluetooth
|
||||
else
|
||||
echo "BLUETOOTH_ENABLED=0" >> /etc/default/bluetooth
|
||||
fi
|
||||
fi
|
||||
if ! grep 'blacklist bnep' /etc/modprobe.d/bluetooth.conf; then
|
||||
echo 'blacklist bnep' >> /etc/modprobe.d/bluetooth.conf
|
||||
fi
|
||||
if ! grep 'blacklist btusb' /etc/modprobe.d/bluetooth.conf; then
|
||||
echo 'blacklist btusb' >> /etc/modprobe.d/bluetooth.conf
|
||||
fi
|
||||
if ! grep 'blacklist bluetooth' /etc/modprobe.d/bluetooth.conf; then
|
||||
echo 'blacklist bluetooth' >> /etc/modprobe.d/bluetooth.conf
|
||||
fi
|
||||
update-initramfs -u -k `uname -r` -v
|
||||
update-rc.d bluetooth remove
|
||||
}
|
||||
|
||||
function running_as_root {
|
||||
if [[ $EUID != 0 ]] ; then
|
||||
echo "0"
|
||||
|
@ -353,6 +376,9 @@ function setup_utils {
|
|||
read_config_param "PROJECT_REPO"
|
||||
write_config_param "PROJECT_REPO" "$PROJECT_REPO"
|
||||
|
||||
function_check remove_bluetooth
|
||||
remove_bluetooth
|
||||
|
||||
function_check turn_off_rsys_logging
|
||||
turn_off_rsys_logging
|
||||
|
||||
|
|
Loading…
Reference in New Issue