ports/149673: [www/shellinabox] improved rc startup script

Olivier Cochard-Labbé olivier at cochard.me
Sun Aug 15 13:30:05 UTC 2010


>Number:         149673
>Category:       ports
>Synopsis:       [www/shellinabox] improved rc startup script
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 15 13:30:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Olivier Cochard-Labbé
>Release:        8.1
>Organization:
>Environment:
FreeBSD d630.bsdrp.net 8.1-RELEASE FreeBSD 8.1-RELEASE #73: Sat Jul 24 10:33:11 CEST 2010     root at d630.bsdrp.net:/usr/obj/usr/src/sys/DellD630  amd64

>Description:
Improve the rc script for permit to use file descriptor of certificate.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

===> Generating patch
===> Viewing diff with more
diff -ruN --exclude=CVS /usr/ports/www/shellinabox.orig/Makefile /usr/ports/www/shellinabox/Makefile
--- /usr/ports/www/shellinabox.orig/Makefile	2010-08-15 09:48:51.000000000 +0200
+++ /usr/ports/www/shellinabox/Makefile	2010-08-15 12:46:12.000000000 +0200
@@ -7,7 +7,7 @@
 
 PORTNAME=	shellinabox
 PORTVERSION=	2.10
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 DISTNAME=	${PORTNAME}-${PORTVERSION}
diff -ruN --exclude=CVS /usr/ports/www/shellinabox.orig/files/shellinaboxd.in /usr/ports/www/shellinabox/files/shellinaboxd.in
--- /usr/ports/www/shellinabox.orig/files/shellinaboxd.in	2010-08-15 09:48:51.000000000 +0200
+++ /usr/ports/www/shellinabox/files/shellinaboxd.in	2010-08-15 12:41:22.000000000 +0200
@@ -18,6 +18,8 @@
 # shellinaboxd_pidfile="/var/run/shellinabox.pid"
 # shellinaboxd_port="4200"
 # shellinaboxd_certdir="%%PREFIX%%/etc/shellinabox"
+# shellinaboxd_certfile=""
+# 	Example: shellinaboxd_certfile="/your/cert.pem"
 # shellinaboxd_flags=""
 
 shellinaboxd_setfib() {
@@ -49,8 +51,13 @@
 
 pidfile=${shellinaboxd_pidfile:-"/var/run/shellinaboxd.pid"}
 
-required_dirs="${shellinaboxd_certdir}"
+command_args="--group=shellinabox --user=shellinabox --port=${shellinaboxd_port} --background=${pidfile}"
 
-command_args="--group=shellinabox --user=shellinabox --port=${shellinaboxd_port} --cert=${shellinaboxd_certdir} --background=${pidfile}"
+if [ "${shellinaboxd_certfile}" = "" ]; then
+	required_dirs="${shellinaboxd_certdir}"
+	command_args="$command_args --cert=${shellinaboxd_certdir}"
+else
+	command_args="$command_args --cert-fd=3 3< ${shellinaboxd_certfile}"
+fi
 
 run_rc_command "$1"
===> Done


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list