ports/50739: Maintainer update: astro/setiathome (nobody->setiathome)

Cyrille Lefevre cyrille.lefevre at laposte.net
Sat Apr 12 13:18:13 UTC 2003


On Fri, Apr 11, 2003 at 01:52:45PM -0700, Crist J. Clark wrote:
> On Fri, Apr 11, 2003 at 10:05:06PM +0200, Cyrille Lefevre wrote:
> [snip]
> 
> > someone reports me that the newer wrapper don't work w/ an account
> > using the csh as the login shell such as the default root account.
> > I don't see this problam since my root account uses a bourne like
> > shell.
> > 
> > so, could you replace 'su -fm' by 'SHELL=/bin/sh su -fm' in
> > files/setiathome.sh.
> 
> That will not fix the problem. The shell spawned by su(1) will still
> be the user's login shell. At least that's what my understading of
> su(1) and some quick tests show.

investigations done.
here is the, sic, final patch :)
thanks for your help.

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/Makefile,v
retrieving revision 1.37
diff -u -I$Id.*$ -I$.+BSD.*$ -r1.37 Makefile
--- Makefile	9 Apr 2003 05:02:42 -0000	1.37
+++ Makefile	12 Apr 2003 13:13:48 -0000
@@ -6,7 +6,7 @@
 
 PORTNAME=	setiathome
 PORTVERSION?=	3.03
-PORTREVISION?=	6
+PORTREVISION?=	7
 CATEGORIES?=	astro
 MASTER_SITES=	ftp://ftp.cdrom.com/pub/setiathome/ \
 		ftp://alien.ssl.berkeley.edu/pub/
Index: files/setiathome.sh
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/files/setiathome.sh,v
retrieving revision 1.10
diff -u -I$Id.*$ -I$.+BSD.*$ -r1.10 setiathome.sh
--- files/setiathome.sh	9 Apr 2003 05:02:42 -0000	1.10
+++ files/setiathome.sh	12 Apr 2003 13:12:56 -0000
@@ -74,17 +74,19 @@
 		fi
 	done
 	for i in ${seti_wrksuff}; do
-		su -fm ${seti_user} -c "\
-			cd ${seti_wrkdir}/${i} || exit; \
-			echo \$\$ > shpid.sah; \
-			trap 'kill \$pid;exit' 15; \
-			while :; do \
+		su -fm ${seti_user} -c "exec /bin/sh -T" << EOF > /dev/null &
+			cd ${seti_wrkdir}/${i} || exit
+			echo \$\$ > shpid.sah
+			trap 'kill \$pid;exit' 15
+			while :; do
 				${program_path} \
 					${seti_std_args} ${seti_proxy_args} \
-					${seti_nice:+-nice} ${seti_nice} & \
-				pid=\$!; wait \$pid; \
-				sleep ${seti_sleep}; \
-			done > /dev/null" &
+					${seti_nice:+-nice} ${seti_nice} &
+				pid=\$!; wait \$pid
+				sleep ${seti_sleep} &
+				pid=\$!; wait \$pid
+			done
+EOF
 	done
 	echo -n " SETI at home"
 	;;

Cyrille.
-- 
Cyrille Lefevre                 mailto:cyrille.lefevre at laposte.net



More information about the freebsd-ports-bugs mailing list