Restore profile USB Network upon reboot or refactor postmarketos-base-ui-networkmanager
Describe your issue
Special pmOS network configurations files should be easily restored to default, in case network setup is sabotaged, preferably like the -common
packages (e.g. openssh-client-common
for ssh
and openssh-server-common
for sshd
which each restores default files under /etc/ssh/
).
What's the expected behaviour?
Restoring configurations by apk fix PACKAGE
.
What's the current behaviour?
Original settings are not restored.
How to reproduce your issue?
Delete profile "USB Networking" using nmtui
.
Or by using Phosh and removing interface "Wired" from Settings > Network > Wired.
What device are you using?
beryllium
On what postmarketOS version did you encounter the issue?
-
edge ( master
branch) -
v23.06
-
v22.12
(Supported until 2023-07-06) -
I confirm that the issue still is present after running sudo apk upgrade -a
On what environment did you encounter the issue?
Environments
-
GNOME Shell on Mobile -
Phosh -
Plasma Mobile -
Sxmo (Wayland/Sway) Please post the output of sxmo_version.sh
-
Other: Please fill out
How did you get postmarketOS image?
-
from https://images.postmarketos.org -
I built it using pmbootstrap -
It was preinstalled on my device
What's the build date of the image? (in yyyy-mm-dd format)
2023-09-06
Additional information
First note:
Setting "Shared" (instead of "Manual") via Phosh UI sabotages the default expected behavior of tethering via USB. The safest way to switch to tethering mode is using nmcli
as instructed at https://wiki.postmarketos.org/wiki/USB_Tethering#Recommended
Second note:
The following command does not fix the issue, and the UUID would (likely to) be different, so unudhcpd
has to be manually terminated to enable Tethering and SSH.
nmcli connection add type ethernet ifname usb0 ipv4.method manual ipv4.address "172.16.42.1/16" ipv6.method link-local con-name "USB Networking"
Third note:
See also #2301 (closed)