How can I run `sudo dpkg --configure -a` headless with "[info] Restarting NetworkManager"

187 Views Asked by At

An installation was interrupted. To fix it, I need to run

sudo dpkg --configure -a

However, I'm headless (Ubuntu, Raspberry Pi), and connect via ssh. dpkg wants to restart the network manager, i.e., I get

[info] Restarting NetworkManager

and then the ssh connection hangs. Maybe there's a prompt or something? Does anybody know why this hangs? Any solutions?

1

There are 1 best solutions below

0
On

This was a specific issue with the home-assistant installer / WiFi, rather than a generic Ubuntu problem.

The installer runs

systemctl restart "${SERVICE_NM}"

which causes WiFi to disconnect. See comment thread here, https://peyanski.com/how-to-install-home-assistant-supervised-official-way/, comment by Tom at 11/02/2022 at 3:34 pm. Solution written up here and filed as a bug report: https://github.com/home-assistant/supervised-installer/issues/273