From owner-freebsd-jail@FreeBSD.ORG Sun Feb 1 00:09:29 2009 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F4621065804; Sun, 1 Feb 2009 00:09:29 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1708FC12; Sun, 1 Feb 2009 00:09:28 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 37DDEAFC1FE; Sat, 31 Jan 2009 15:09:28 -0900 (AKST) From: Mel To: freebsd-questions@freebsd.org Date: Sat, 31 Jan 2009 15:09:27 -0900 User-Agent: KMail/1.9.10 References: <20090128202556.GA30226@haydn.nognu.de> <200901281523.33379.fbsd.questions@rachie.is-a-geek.net> <20090129010926.GA6652@haydn.nognu.de> In-Reply-To: <20090129010926.GA6652@haydn.nognu.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901311509.28014.fbsd.questions@rachie.is-a-geek.net> Cc: "Bjoern A. Zeeb" , freebsd-jail@freebsd.org Subject: Re: Problem with ezjail: Manually restarted jails don't come up again X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2009 00:09:29 -0000 On Wednesday 28 January 2009 16:09:26 Frank Steinborn wrote: > On Wed, Jan 28, 2009 at 03:23:33PM -0900, Mel wrote: > > On Wednesday 28 January 2009 12:24:31 Frank Steinborn wrote: > > > 37948 p3 TJ 0:00.01 -su -c /bin/sh -c ^I"/usr/local/bin/mlnet ^I > > > ^I ^I>> /dev/null 2>&1 &" (zsh) > > > > ^^^ > > Why is zsh shell involved? > > This was it. I should not have used the root-account inside the jails > with zsh. I now use the toor account on zsh and put the shell of root > back to csh everywhere. > > However, I don't understand why zsh is invoked, since all rc.d-scripts > have shebang lines telling them to use /bin/sh? I'm a bit confused, > maybe can someone give a bit light on this... su invokes $SHELL of the target user, from su(8): By default, the environment is unmodified with the exception of USER, HOME, and SHELL. HOME and SHELL are set to the target login's default values. USER is set to the target login, unless the target login has a user ID of 0, in which case it is unmodified. The invoked shell is the one belonging to the target login. This is the traditional behavior of su. So: su root -c /bin/sh expands to ${SHELL} /bin/sh -- Mel Problem with today's modular software: they start with the modules and never get to the software part.