From owner-freebsd-questions@FreeBSD.ORG Sat May 17 16:10:23 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8A7437B401 for ; Sat, 17 May 2003 16:10:23 -0700 (PDT) Received: from doriath.saers.com (doriath.religion.no [193.156.192.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBEDB43FCB for ; Sat, 17 May 2003 16:10:22 -0700 (PDT) (envelope-from niklasmls@doriath.saers.com) Received: by doriath.saers.com (Postfix, from userid 1001) id 4443543F6; Sun, 18 May 2003 01:10:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by doriath.saers.com (Postfix) with ESMTP id 3DCFF43EA; Sun, 18 May 2003 01:10:21 +0200 (CEST) Date: Sun, 18 May 2003 01:10:21 +0200 (CEST) From: Niklas Saers Mailinglistaccount To: =?ISO-8859-1?Q?Rapha=EBl_Marmier?= In-Reply-To: Message-ID: <20030518010947.U37832@doriath.saers.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE cc: FreeBSD-Questions@freebsd.org Subject: Re: bash shell for-loop X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2003 23:10:23 -0000 Hi, On Sat, 17 May 2003, [ISO-8859-1] Rapha=EBl Marmier wrote: > Looks like it stop to ask fo the password... not really, I type "fg" and it continues, then stopping again before redoing the loop Cheers Nik > > Raphael > > Le samedi, 17 mai 2003, =E0 16:55 Europe/Zurich, Niklas Saers > Mailinglistaccount a =E9crit : > > > Hi, > > I've created a small bash script that stops, and I cannot understand > > why > > it stops. It is: > > > > #!/usr/local/bin/bash > > for username in $(ls /home); do > > su -m $username /home/$username/startup.sh; > > done > > > > When I type this at the bash prompt, it goes well. However, when I call > > this script it executes the first su and then gives me: > > > > [4]+ Stopped bash /tmp/sh.sh > > > > Why does it stop? I've nowhere asked it to stop. I certainly don't > > want it > > to stop. > > > > To explain my command, I start a set of daemons for each user > > specified in > > ~/startup.sh and no user has a valid shell as I do not wish to allow > > them > > any kind of login access. Thus I have to include the "-m" > > > > What makes a bash script stop? How can I set it to ignore whatever is > > requesting it (errorlevels?) to stop? > > > > Cheers > > > > Nik > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to > > "freebsd-questions-unsubscribe@freebsd.org" > >