@dotpi/tools 2.9.4 → 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,17 @@ 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
+
49
+ # wait for system time update to be able to verify certificates needed by apt
50
+ dotpi echo_info "Wait for the system clock to update from network"
51
+ while [[ $(timedatectl show --property NTPSynchronized --value | grep yes | wc -l) == 0 ]] ; do
52
+ date
53
+ sleep 5
54
+ done
55
+ date
56
+
44
57
  ############### system packages via apt
45
58
  error_exit_code_package=2
46
59
 
@@ -6,6 +6,5 @@
6
6
  "postinstall": "./dotpi_install",
7
7
  "preuninstall": "./dotpi_uninstall"
8
8
  },
9
- "license": "BSD-3-clause",
10
- "gitHead": "4d1e910bebccdd2f2dead03a321695601bb3880e"
9
+ "license": "BSD-3-clause"
11
10
  }
@@ -12,6 +12,5 @@
12
12
  "chalk": "^5.4.0",
13
13
  "execa": "^9.5.2",
14
14
  "template-literal": "^1.0.4"
15
- },
16
- "gitHead": "4d1e910bebccdd2f2dead03a321695601bb3880e"
15
+ }
17
16
  }
@@ -11,6 +11,5 @@
11
11
  "@dotpi/javascript": "^1.6.2",
12
12
  "execa": "^9.5.2",
13
13
  "globby": "^14.0.2"
14
- },
15
- "gitHead": "4d1e910bebccdd2f2dead03a321695601bb3880e"
14
+ }
16
15
  }
@@ -13,6 +13,5 @@
13
13
  "@dotpi/javascript": "^1.6.2",
14
14
  "@dotpi/module": "^1.8.2",
15
15
  "commander": "^12.1.0"
16
- },
17
- "gitHead": "4d1e910bebccdd2f2dead03a321695601bb3880e"
16
+ }
18
17
  }
@@ -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.4",
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": "4d1e910bebccdd2f2dead03a321695601bb3880e"
49
+ "gitHead": "1932fccf5d1302b69e18b7ff416f9bff60efd0d9"
50
50
  }
@@ -1,28 +0,0 @@
1
- Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
-
3
- All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without modification,
6
- are permitted provided that the following conditions are met:
7
-
8
- * Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
10
-
11
- * Redistributions in binary form must reproduce the above copyright notice, this
12
- list of conditions and the following disclaimer in the documentation and/or
13
- other materials provided with the distribution.
14
-
15
- * Neither the name of the IRCAM nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,28 +0,0 @@
1
- Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
-
3
- All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without modification,
6
- are permitted provided that the following conditions are met:
7
-
8
- * Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
10
-
11
- * Redistributions in binary form must reproduce the above copyright notice, this
12
- list of conditions and the following disclaimer in the documentation and/or
13
- other materials provided with the distribution.
14
-
15
- * Neither the name of the IRCAM nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,28 +0,0 @@
1
- Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
-
3
- All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without modification,
6
- are permitted provided that the following conditions are met:
7
-
8
- * Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
10
-
11
- * Redistributions in binary form must reproduce the above copyright notice, this
12
- list of conditions and the following disclaimer in the documentation and/or
13
- other materials provided with the distribution.
14
-
15
- * Neither the name of the IRCAM nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,28 +0,0 @@
1
- Copyright (c) 2023-present IRCAM – Centre Pompidou (France, Paris)
2
-
3
- All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without modification,
6
- are permitted provided that the following conditions are met:
7
-
8
- * Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
10
-
11
- * Redistributions in binary form must reproduce the above copyright notice, this
12
- list of conditions and the following disclaimer in the documentation and/or
13
- other materials provided with the distribution.
14
-
15
- * Neither the name of the IRCAM nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.