pia-foss / desktop

Private Internet Access - Desktop VPN Client for Windows/macOS/Linux
Other
263 stars 50 forks source link

Pass path of ip command to openvpn. #24

Closed jacobly0 closed 3 years ago

jacobly0 commented 3 years ago

Description On various systems, the ip command can be at /sbin/ip, /bin/ip, or /usr/sbin/ip. The latest included openvpn seems to be using a hardcoded path of /sbin/ip, presumably determined at build time. This PR just determines the correct path and passes it to openvpn to override the hardcoded path.

Checklist

Testing Plan From what I understand at least Fedora 33 and CentOS use /usr/sbin/ip, and so this should fix a failure to connect on those systems.

JonathonH-PIA commented 3 years ago

This looks great jacobly0! Could you please put an #ifdef Q_OS_LINUX around this so it does not impact Win/Mac builds?

We have a 2.8 release in testing right now, but as soon as that is up I'd like to merge this for our next release!

JonathonH-PIA commented 3 years ago

This needs a #include <QStandardPaths> too to build with Qt 5.15.2 but I'll add it after merging.

@jacobly0 Let me know if you'd like a credit in the next changelog and whether you'd prefer your username or real name! My email in in my profile if you'd rather get in touch that way.