@dotpi/tools 2.14.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dotpi_root/share/dotpi_functions/dotpi_functions_audio_bluetooth.bash +10 -0
- package/dotpi_root/share/dotpi_functions/dotpi_functions_audio_device.bash +1 -1
- package/dotpi_root/share/dotpi_functions/dotpi_functions_bluetooth.bash +7 -2
- package/package.json +2 -2
- package/src/templates/ap.nmconnection.template +3 -2
|
@@ -9,6 +9,11 @@ fi
|
|
|
9
9
|
# connect an audio bluetooth device, corresponding to dotpi_audio_bluetooth_mac,
|
|
10
10
|
# using bluetoothctl,
|
|
11
11
|
dotpi_audio_bluetooth_destination_connect() (
|
|
12
|
+
if [[ "$USER" != "root" ]]; then
|
|
13
|
+
dotpi echo_error "This command must be run as root"
|
|
14
|
+
return 1
|
|
15
|
+
fi
|
|
16
|
+
|
|
12
17
|
destination_mac="$dotpi_audio_bluetooth_mac"
|
|
13
18
|
|
|
14
19
|
dotpi_echo_info "Starting bluetoothctl process"
|
|
@@ -104,6 +109,11 @@ dotpi_audio_bluetooth_destination_connect() (
|
|
|
104
109
|
)
|
|
105
110
|
|
|
106
111
|
dotpi_audio_bluetooth_destination_disconnect() (
|
|
112
|
+
if [[ "$USER" != "root" ]]; then
|
|
113
|
+
dotpi echo_error "This command must be run as root"
|
|
114
|
+
return 1
|
|
115
|
+
fi
|
|
116
|
+
|
|
107
117
|
bluetoothctl -- remove "$dotpi_audio_bluetooth_mac"
|
|
108
118
|
)
|
|
109
119
|
|
|
@@ -333,7 +333,7 @@ dotpi_audio_device_select() (
|
|
|
333
333
|
|
|
334
334
|
# test for a running dotpi system
|
|
335
335
|
if [[ -z "$dotpi_filesystem_only" ]] ; then
|
|
336
|
-
dotpi_echo_warning "To finalise the audio device selection, please reboot and run '
|
|
336
|
+
dotpi_echo_warning "To finalise the audio device selection, please reboot and run 'dotpi audio_device_init'"
|
|
337
337
|
fi
|
|
338
338
|
)
|
|
339
339
|
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
dotpi_bluetooth_enable() {
|
|
4
4
|
|
|
5
|
+
if [[ "$USER" != "root" ]]; then
|
|
6
|
+
dotpi echo_error "This command must be run as root"
|
|
7
|
+
return 1
|
|
8
|
+
fi
|
|
9
|
+
|
|
5
10
|
dotpi_echo_info "Enabling Bluetooth"
|
|
6
11
|
|
|
7
12
|
bluetoothctl power off
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
rfkill unblock bluetooth
|
|
14
|
+
systemctl restart bluetooth
|
|
10
15
|
bluetoothctl power on
|
|
11
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotpi/tools",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.1",
|
|
4
4
|
"description": "Set of scripts for managing dotpi fleets of Raspberry Pi",
|
|
5
5
|
"author": "Jean-Philippe Lambert",
|
|
6
6
|
"contributors": [
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"lerna": "^10.1.1"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "7374ff0ba8b0ce855149e149031a2439ee692f10"
|
|
50
50
|
}
|
|
@@ -11,8 +11,9 @@ ssid=${d.wifiSsid}
|
|
|
11
11
|
# disable power management
|
|
12
12
|
powersave=2
|
|
13
13
|
|
|
14
|
-
# "a" for 5Ghz only, "bg" for 2.4GHz only
|
|
15
|
-
|
|
14
|
+
# band: "a" for 5Ghz only, "bg" for 2.4GHz only
|
|
15
|
+
# omit parameter to keep default automatic selection
|
|
16
|
+
${d.wifiBand !== 'automatic' ? band=d.wifiBand : ''}
|
|
16
17
|
|
|
17
18
|
[wifi-security]
|
|
18
19
|
key-mgmt=wpa-psk
|