From owner-freebsd-questions@FreeBSD.ORG Sat May 17 12:44:53 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 01E5137B401 for ; Sat, 17 May 2003 12:44:53 -0700 (PDT) Received: from mail1.bluewin.ch (mail1.bluewin.ch [195.186.1.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB69543FA3 for ; Sat, 17 May 2003 12:44:51 -0700 (PDT) (envelope-from raphael@computer-rental.ch) Received: from computer-rental.ch (195.186.234.186) by mail1.bluewin.ch (Bluewin AG 6.7.018) id 3EC34E8600071D35; Sat, 17 May 2003 19:44:50 +0000 Date: Sat, 17 May 2003 21:44:28 +0200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v552) To: Niklas Saers Mailinglistaccount From: =?ISO-8859-1?Q?Rapha=EBl_Marmier?= In-Reply-To: <20030517164813.V37832@doriath.saers.com> Message-Id: Content-Transfer-Encoding: quoted-printable X-Mailer: Apple Mail (2.552) 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 19:44:53 -0000 Looks like it stop to ask fo the password... Raphael Le samedi, 17 mai 2003, =E0 16:55 Europe/Zurich, Niklas Saers=20 Mailinglistaccount a =E9crit : > Hi, > I've created a small bash script that stops, and I cannot understand=20= > 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=20 > want it > to stop. > > To explain my command, I start a set of daemons for each user=20 > specified in > ~/startup.sh and no user has a valid shell as I do not wish to allow=20= > 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=20 > "freebsd-questions-unsubscribe@freebsd.org"