switch: guard the IMEI generation with a timeout

So that we can be reasonably sure that the script terminates and the
switch works again.
This commit is contained in:
Tobias Mueller 2023-10-18 14:51:46 +02:00
parent 9c08efc19a
commit c68661e1a5
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ done
## We generate a random IMEI to prevent a leak of the
## new SIM's IMSI under the old IMEI in case the modem
## still talks to the network
python3 /lib/blue-merle/imei_generate.py -r
timeout 15 python3 /lib/blue-merle/imei_generate.py -r
mcu_send_message "Replace the SIM card. Then pull the switch."

View File

@ -39,7 +39,7 @@ if [[ "$old_imsi" == "$new_imsi" ]]; then
fi
mcu_send_message "Setting random IMEI"
python3 /lib/blue-merle/imei_generate.py -r
timeout 15 python3 /lib/blue-merle/imei_generate.py -r
new_imei=$(READ_IMEI)