@dotpi/tools 2.9.5 → 2.9.6

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.
@@ -23,6 +23,8 @@ if [[ $(whoami) != "${FIRSTUSER}" ]] ; then
23
23
  error_exit 255 "This script MUST be executed by pi user (or first user)" $error_exit_code_init
24
24
  fi
25
25
 
26
+ dotpi echo_info "Configure wifi"
27
+
26
28
  DOTPI_ROOT="${DOTPI_ROOT:-/opt/dotpi}"
27
29
  source "${DOTPI_ROOT}/share/dotpi_init.bash" || {
28
30
  error_exit $? "source dotpi_init.bash" $error_exit_code_init
@@ -41,6 +43,9 @@ sudo raspi-config nonint do_wifi_country "${dotpi_wifi_country_code}" || {
41
43
  sudo nmcli radio wifi on
42
44
  sudo rfkill unblock wifi
43
45
 
46
+ dotpi echo_info "Update network configurations"
47
+ sudo dotpi connections_update
48
+
44
49
  # wait for system time update to be able to verify certificates needed by apt
45
50
  dotpi echo_info "Wait for the system clock to update from network"
46
51
  while [[ $(timedatectl show --property NTPSynchronized --value | grep yes | wc -l) == 0 ]] ; do
@@ -359,6 +359,9 @@ _dotpi_audio_device_select_headphones() (
359
359
 
360
360
  _dotpi_audio_device_select_bluetooth() (
361
361
  _dotpi_audio_device_disable_all bluetooth
362
+ bluetoothctl power off
363
+ rfkill unblock all
364
+ sudo bluetoothctl power on
362
365
  )
363
366
 
364
367
  _dotpi_audio_device_select_raspberry_pi() (
@@ -233,6 +233,13 @@ dotpi_connections_update() (
233
233
  # NetworkManager requires secure permissions
234
234
  chmod 'u=rw,go=' "${destination_path}"/*
235
235
  chown -R root:root "${destination_path}"
236
+
237
+ systemctl restart NetworkManager.service || {
238
+ return_code=$?
239
+ dotpi echo_error "error while restarting NetworkManager.service: ${return_code}"
240
+ return "${return_code}"
241
+ }
242
+
236
243
  )
237
244
 
238
245
  dotpi_connection_ap_id_get() (
@@ -365,11 +372,6 @@ dotpi_connection_ap_activate() (
365
372
  done < <(find "${connections_path}" -name '*.nmconnection*' -print0)
366
373
 
367
374
  dotpi_connections_update
368
- systemctl restart NetworkManager.service || {
369
- return_code=$?
370
- dotpi echo_error "error while restarting NetworkManager.service: ${return_code}"
371
- return "${return_code}"
372
- }
373
375
  )
374
376
 
375
377
 
@@ -434,10 +436,4 @@ dotpi_connection_ap_deactivate() (
434
436
  done < <(find "${connections_path}" -name '*.nmconnection*' -print0)
435
437
 
436
438
  dotpi_connections_update
437
- systemctl restart NetworkManager.service || {
438
- return_code=$?
439
- dotpi echo_error "error while restarting NetworkManager.service: ${return_code}"
440
- return "${return_code}"
441
- }
442
-
443
439
  )
@@ -0,0 +1,7 @@
1
+
2
+ # do not start and stop bluez with login: always run
3
+ wireplumber.profiles = {
4
+ main = {
5
+ monitor.bluez.seat-monitoring = disabled
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpi/tools",
3
- "version": "2.9.5",
3
+ "version": "2.9.6",
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": "^8.2.4"
48
48
  },
49
- "gitHead": "7c2c9f4eb8073a95ecee59879c9ab663be15a2b7"
49
+ "gitHead": "1932fccf5d1302b69e18b7ff416f9bff60efd0d9"
50
50
  }