releng: Improve WWAN support

As the mailing list thread [arch-general] Arch intallation using usb-modem shows, installing Arch using a WWAN/mobile broadband connection is not a painless experience. We should strive to improve this somehow.

Basically we need to:

  • connect to the mobile network using something,
  • use systemd-networkd for DHCP.

Looking at the options in https://wiki.archlinux.org/index.php/USB_3G_Modem#Connection, the easiest appears to be ModemManager. It should just work with:

$ mmcli -m 0 --simple-connect="pin=INSERT_PIN_HERE,apn=INSERT_APN_HERE,user=INSERT_USER_HERE,password=INSERT_PASSWORD_HERE"

For the command itself only apn is required, others depend on the ISP and the SIM card settings.

For systemd-networkd, it's as simple as configuring DHCP for ww* interfaces. This would match the configuration for Ethernet and Wi-Fi interfaces, i.e. DHCP by default and those who need static addresses must configure it manually.

E.g.:

/etc/systemd/network/20-wwan.network
[Match]
Type=wwan

[Network]
DHCP=yes
IPv6PrivacyExtensions=yes

[DHCPv4]
RouteMetric=2048

[DHCPv6]
RouteMetric=2048
Edited by nl6720