Skip to content

create portable systemd.service files #7743

@mervn

Description

@mervn

Is it a bug?

  • I know this is an issue with the app, and contacting Mullvad support is not relevant.

I have checked if others have reported this already

  • I have checked the issue tracker to see if others have reported similar issues.

Current Behavior

Non-portable service files.

The current systemd.service files are ordered against specific services. This is not portable across systems. Because of this users are required to edit the service file, or abandon their current setup, for proper functionality.

Expected Behavior

Portable service files.

These issues may be avoided by using standard systemd targets (i.e. network-online.target).

For example, this After= directive from mullvad-daemon.service can instead be "After=network.target". This works since network managers (i.e iwd systemd-networkd) and resolvers (i.e. systemd-resolved) are expected to be up before this target. As a result, the non-portable ordering against NetworkManager is removed and IWD systems do not break.

Similarly, this Before= directive from mullvad-early-boot-blocking.service can instead be "Before=network-pre.target". Because it is expected that no network service is started before this point, which is a perfect fit for an early firewall.

Steps to Reproduce

  1. Install mullvadvpn-app (on a system not using NetworkManager)
  2. Enable mullvad systemd.service files
  3. Enable network service files that may also run (like IWD or systemd-networkd)
  4. Reboot system
  5. Mullvad, or the network service, may fail several times due to missing resources (bad ordering)

Failure Logs

Operating system version

No response

Mullvad VPN app version

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    LinuxIssues related to Linuxbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions