Bug 176321 - [PATCH] net/socat: rc script / daemon changes
Summary: [PATCH] net/socat: rc script / daemon changes
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-21 13:40 UTC by Mark Felder
Modified: 2013-03-08 06:50 UTC (History)
1 user (show)

See Also:


Attachments
socat-1.7.2.1_1.patch (5.04 KB, patch)
2013-02-21 13:40 UTC, Mark Felder
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Felder freebsd_committer freebsd_triage 2013-02-21 13:40:00 UTC
Last year when I submitted a patch to make socat properly daemonize I was unaware
of the existence of daemon(8). This patch changes the rc script to 
launch socat using daemon and removes the unnecessary wrapper script.

Removed file(s):
- files/socat_wrapper

Port maintainer (ehaupt@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: suffix)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-02-21 13:40:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ehaupt

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-03-08 06:40:21 UTC
Author: ehaupt
Date: Fri Mar  8 06:40:12 2013
New Revision: 313620
URL: http://svnweb.freebsd.org/changeset/ports/313620

Log:
  Change rc script to launch socat using daemon and remove the unnecessary
  wrapper script.
  
  PR:		176321
  Submitted by:	Mark Felder <feld@feld.me>

Deleted:
  head/net/socat/files/socat_wrapper
Modified:
  head/net/socat/Makefile
  head/net/socat/files/socat.in

Modified: head/net/socat/Makefile
==============================================================================
--- head/net/socat/Makefile	Fri Mar  8 06:29:31 2013	(r313619)
+++ head/net/socat/Makefile	Fri Mar  8 06:40:12 2013	(r313620)
@@ -3,6 +3,7 @@
 
 PORTNAME=	socat
 PORTVERSION=	1.7.2.1
+PORTREVISION=	1
 CATEGORIES=	net ipv6
 MASTER_SITES=	http://www.dest-unreach.org/socat/download/ \
 		CRITICAL
@@ -21,7 +22,7 @@ MAKE_JOBS_SAFE=	yes
 PORTSCOUT=	skipv:2.0.0-b2
 
 MAN1=		socat.1
-PLIST_FILES=	bin/filan bin/procan bin/socat sbin/socat_wrapper
+PLIST_FILES=	bin/filan bin/procan bin/socat
 PORTDOCS=	EXAMPLES README SECURITY FAQ
 
 .if ${CC} == clang
@@ -36,7 +37,6 @@ do-install:
 .for f in filan procan socat
 	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin
 .endfor
-	${INSTALL_SCRIPT} ${FILESDIR}/socat_wrapper ${PREFIX}/sbin
 	${INSTALL_MAN} ${WRKSRC}/doc/${MAN1} ${MAN1PREFIX}/man/man1
 .if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${DOCSDIR}

Modified: head/net/socat/files/socat.in
==============================================================================
--- head/net/socat/files/socat.in	Fri Mar  8 06:29:31 2013	(r313619)
+++ head/net/socat/files/socat.in	Fri Mar  8 06:40:12 2013	(r313620)
@@ -22,9 +22,13 @@ load_rc_config $name
 
 : ${socat_enable="NO"}
 
-socat_flags="%%PREFIX%%/bin/socat ${socat_flags} &"
-command="%%PREFIX%%/sbin/socat_wrapper"
-command_interpreter="/bin/sh -T"
-pidfile=/var/run/socat_wrapper.pid
+start_cmd="${name}_start"
+pidfile=/var/run/socat.pid
+command="%%PREFIX%%/bin/socat"
+
+socat_start() {
+	echo "Starting ${name}."
+	/usr/sbin/daemon -f -p ${pidfile} ${command} ${socat_flags}
+}
 
 run_rc_command "$1"
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Emanuel Haupt freebsd_committer freebsd_triage 2013-03-08 06:40:35 UTC
State Changed
From-To: open->closed

Committed, thanks!