opnsense / ports

OPNsense ports on top of FreeBSD
https://opnsense.org/
Other
157 stars 114 forks source link

net/wireguard-tools - rcng script improvements #135

Closed pmhausen closed 2 years ago

pmhausen commented 2 years ago

The wireguard rcng script lacks a status command. I am not quite sure if I should file this here or with upstream (FreeBSD ports), but here's my proposed fix, anyway.

Kind regards, Patrick

AdSchellevis commented 2 years ago

@pmhausen best offer the change upstream, we try to keep our differences as small as possible for the ports tree.

pmhausen commented 2 years ago

Of course. Why are you forking the ports at all instead of just installing from the official FreeBSD pkg repo? Just curious ;-)

fichtner commented 2 years ago

Hold it with the judgement, either the rc script didn’t exist back then or still doesn’t exist upstream. 😉

pmhausen commented 2 years ago

Ooops :) I just created https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259397

I'll go check.

pmhausen commented 2 years ago

The rcng script is present in net/wireguard-tools in upstream: https://cgit.freebsd.org/ports/tree/net/wireguard-tools/files/wireguard_wgquick.in

Feel free to use my patch, anyway, if you prefer. I don't know how (and how frequently) you go about syncing upstream improvements to your ports tree.

pmhausen commented 2 years ago

I'll add the option to redirect stdout and stderr to a proper logfile if desired. Wireguard stubbornly logs to the terminal. To my knowledge there is no option to configure a real log or logging to syslogd.

Some tools just seem to be like that. catalina.out, anyone? (Apache Tomcat)

This is supposed to go hand in hand with: https://github.com/opnsense/plugins/pull/2613

pmhausen commented 2 years ago

So, that's my suggestion. I will take the discussion upstream, specifically because it doesn't make much sense once we finally switch to the kernel module. In the meantime it's useful, though. Specifically with the patch to the plugin.

pmhausen commented 2 years ago

My service wireguard status suggestion has been merged upstream. The logfile issue needs some more investigation once we run on the kernel module exclusively. So I'm closing this. Thanks for your work, folks!

fichtner commented 2 years ago

@pmhausen it missed our release window but 21.7.6 will have it, thanks!

fichtner commented 2 years ago

refs https://github.com/opnsense/ports/commit/a1e2085822