wireguard-tools: hard coded config paths in wg-quick

Calvin Ardi calvin at isi.edu
Sun Jun 24 17:51:24 CEST 2018


The wg-quick bash scripts have their CONFIG_SEARCH_PATHS hard coded to
two locations [1]:

  CONFIG_SEARCH_PATHS=( /etc/wireguard /usr/local/etc/wireguard )

In my use case with MacPorts (and perhaps with Homebrew, if customized
differently), mostly everything lives in /opt/local by default, so users
would initially add their configs to /opt/local/etc/wireguard.

Since the Makefile supports setting and using SYSCONFDIR [2, 3], I
suggest that the CONFIG_SEARCH_PATHS have the value of SYSCONFDIR added
to it--I don't know of a "clean" way to do this besides patching the
scripts in the Makefile during the `make install'

More than happy to help with a patch (creating, testing, or otherwise).


[1] https://git.zx2c4.com/WireGuard/tree/src/tools/wg-quick/darwin.bash#n43
[2] https://git.zx2c4.com/WireGuard/tree/src/tools/Makefile#n8
[3] https://git.zx2c4.com/WireGuard/tree/src/tools/Makefile#n81

More information about the WireGuard mailing list