Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Apr 2003 15:17:58 +0200
From:      Cyrille Lefevre <cyrille.lefevre@laposte.net>
To:        cjclark@alum.mit.edu
Cc:        Scott Allendorf <scott-allendorf@uiowa.edu>
Subject:   Re: ports/50739: Maintainer update: astro/setiathome (nobody->setiathome)
Message-ID:  <20030412131758.GA61478@gits.dyndns.org>
In-Reply-To: <20030411205245.GA84569@blossom.cjclark.org>
References:  <200304090512.h395CGrJ014714@freefall.freebsd.org> <20030411200506.GA36868@gits.dyndns.org> <20030411205245.GA84569@blossom.cjclark.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@home"
 	;;

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030412131758.GA61478>