ports/112253: [PATCH] net-p2p/mldonkey: rc script broken

Marcin Wisnicki mwisnicki+freebsd at gmail.com
Sun Apr 29 19:50:04 UTC 2007


>Number:         112253
>Category:       ports
>Synopsis:       [PATCH] net-p2p/mldonkey: rc script broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 29 19:50:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Marcin Wisnicki
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD ghost.pnet.one.pl 6.2-STABLE FreeBSD 6.2-STABLE #5: Sat Feb 10 23:20:51 CET 2007
>Description:
Redirection depends on sh syntax which is not availible in tcsh.
Su executes command in default login shell which on some systems might be tcsh
or something else. Proposed patch explicitly calls /bin/sh.

Another solution would be to execute "daemon -f ${command} ..." instead of
redirection, which I used before with success.

Of course, same thing applies to mldonkey-devel.

Port maintainer (lioux at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
set ${mlnet_user} to someone with non-bourne shell
# /usr/local/etc/rc.d/mlnet start
Ambiguous output redirect.

>Fix:

--- mldonkey-2.8.5.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/net-p2p/mldonkey.orig/files/mlnet.in /usr/ports/net-p2p/mldonkey/files/mlnet.in
--- /usr/ports/net-p2p/mldonkey.orig/files/mlnet.in	Sat Dec 23 03:56:55 2006
+++ /usr/ports/net-p2p/mldonkey/files/mlnet.in	Sun Apr 29 21:27:27 2007
@@ -59,10 +59,10 @@
 	${mlnet_flags} \
 	>> ${mlnet_logfile} 2>&1 &"
   else
-    su -l ${mlnet_user} -c "${command} \
+    su -l ${mlnet_user} -c "/bin/sh -c \"${command} \
 	${mlnet_logcommand} \
 	${mlnet_flags} \
-	>> ${mlnet_logfile} 2>&1 &"
+	>> ${mlnet_logfile} 2>&1 &\""
   fi
 }
 
--- mldonkey-2.8.5.patch ends here ---

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



More information about the freebsd-ports-bugs mailing list