From a8a90e258d45a5d43aa2492df8e646b5faf6b606 2018-11-24 02:02:33 From: Unknown Date: 2018-11-24 02:02:33 Subject: [PATCH] Enable_Bluetooth var - enable_bluetooth var - merged if's in networking.sh --- diff --git a/README.md b/README.md index 1c70d00..68abb9f 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,6 @@ Set the IP address for the second NTP server. #### Basic system features: ##### `ENABLE_CONSOLE`=true Enable serial console interface. Recommended if no monitor or keyboard is connected to the RPi2/3. In case of problems fe. if the network (auto) configuration failed - the serial console can be used to access the system. -On `RPI_MODEL= 0,3,3P` - Bluetooth gets auto enabled if `ENABLE_CONSOLE` and `ENABLE_UBOOT` are set to `false` ##### `ENABLE_I2C`=false Enable I2C interface on the RPi2/3. Please check the [RPi2/3 pinout diagrams](https://elinux.org/RPi_Low-level_peripherals) to connect the right GPIO pins. diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 9e37246..d686765 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -396,6 +396,14 @@ if [ "$ENABLE_BLUETOOTH" = true ] ; then fi fi +if [ "$ENABLE_BLUETOOTH" = true ] ; then + if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then + if [ "$ENABLE_CONSOLE" = false ] ; then + APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez" + fi + fi +fi + # Check if root SSH (v2) public key file exists if [ -n "$SSH_ROOT_PUB_KEY" ] ; then if [ ! -f "$SSH_ROOT_PUB_KEY" ] ; then