Bug 226405 - [PATCH] net/socat: Add multi-instances rc(8) support by using a config file.
Summary: [PATCH] net/socat: Add multi-instances rc(8) support by using a config file.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-06 20:19 UTC by Harald Schmalzbauer
Modified: 2018-07-07 11:38 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ehaupt)


Attachments
Extend net/socat rc(8) script to handle multiple daemon/socat(1) instances (7.97 KB, patch)
2018-03-06 20:19 UTC, Harald Schmalzbauer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Schmalzbauer 2018-03-06 20:19:44 UTC
Created attachment 191262 [details]
Extend net/socat rc(8) script to handle multiple daemon/socat(1) instances

Dear net/socat port fellows,

please find attached a diff which enables users to start/manage multiple instances of daemon(8) supervised socat(1) processes.

I've done it by introducing a simple config file and extended files/socat.in to parse that.
Also included in the patch is a sample config file.
Warnings will be emitted to users if new config interferes with traditional setups.

I have to admit that I have never read style(?) nor have I run portlint or poudriere – over to maintainer.

But I have tested it and paid attention to common FreeBSD ports practices – as far as I'm aware about.
Mistake pointers are welcome, but I won't have time for further extensions.

-harry
Comment 1 Harald Schmalzbauer 2018-03-06 20:26:21 UTC
Comment on attachment 191262 [details]
Extend net/socat rc(8) script to handle multiple daemon/socat(1) instances

I forgot to change the IPs in the sample config.
In case somebody want's to commit, please change the ntp6 example to 2001:DB8::1:2:3 and I'd suggest to also change the RFC1918 (ntp4) address to 192.0.2.20.

-harry
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-07-07 11:34:09 UTC
A commit references this bug:

Author: ehaupt
Date: Sat Jul  7 11:33:50 UTC 2018
New revision: 474074
URL: https://svnweb.freebsd.org/changeset/ports/474074

Log:
  Add multi-instances rc(8) support by using a config file.

  PR:		226405
  Submitted by:	Harald Schmalzbauer <bugzilla.freebsd@omnilan.de>

Changes:
  head/net/socat/Makefile
  head/net/socat/files/socat-instances.conf.sample
  head/net/socat/files/socat.in
Comment 3 Emanuel Haupt freebsd_committer freebsd_triage 2018-07-07 11:38:38 UTC
Thank you very much for the nice patch. I've just committed it along with your suggested changes in your last comment.