From owner-freebsd-current@FreeBSD.ORG Thu May 5 02:18:01 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E125216A4CE for ; Thu, 5 May 2005 02:18:00 +0000 (GMT) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3ED143D54 for ; Thu, 5 May 2005 02:18:00 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin07-en2 [10.13.10.152]) id j452GaFK009888; Wed, 4 May 2005 19:16:36 -0700 (PDT) Received: from [192.168.1.6] (pool-68-161-53-96.ny325.east.verizon.net [68.161.53.96]) (authenticated bits=0)j452GX92018229; Wed, 4 May 2005 19:16:35 -0700 (PDT) In-Reply-To: <20050504.185153.78707420.imp@bsdimp.com> References: <20050504.163618.112621888.imp@bsdimp.com> <20050504.185153.78707420.imp@bsdimp.com> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <6dc0162f9029defe6980a9ae28bb5175@mac.com> Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Wed, 4 May 2005 22:16:33 -0400 To: "M. Warner Losh" X-Mailer: Apple Mail (2.622) cc: freebsd-current@freebsd.org Subject: Re: boot banner project X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2005 02:18:02 -0000 On May 4, 2005, at 8:51 PM, M. Warner Losh wrote: > : The fact that the /etc/rc scripts, cron, and similar tools involving > : root's environment are all run using /bin/sh is one of the primary > : reasons why root shell ought to be /bin/sh. There are newgroup FAQs > : for various platforms which recommend against changing root's shell > : from being a /bin/sh. > > That doesn't follow. Do FreeBSD users ever have problems setting up cron jobs because their interactive environment and cron's are not the same? > All my shell scripts run /bin/sh, yet my default shell is /bin/tcsh. Sure; lots of people prefer another shell for interactive use. It's not hard to do "exec tcsh", or put that in ~root/.profile, hopefully wrapped in a test for whether the shell is interactive. I have a .cshrc floating around which has this near the end: # skip remaining setup if not an interactive shell if ($?USER == 0 || $?prompt == 0) exit ...and the end of a .login which looks like: # Note: this section is for interactive shells. case $- in *i*) eval `tset -s` 2> /dev/null if [ ! -f .hushlogin ]; then # IMPORTANT: place commands that might produce output here. quota -q mesg y msgs -fp 2> /dev/null # allow the user to break the Message-Of-The-Day display. #trap "trap '' 2" 2 #/bin/cat -s /etc/motd #trap "" 2 fi esac trap 2 3 Put an "exec tcsh" in there instead of the MOTD code (which clearly isn't needed on FreeBSD).... > But like I've said twice now: There's lots of bigger problems in the > tree, and a change like this could break things. There's enough > breakage in the tree now. Data point: I've been running /bin/sh as root's shell on a bunch of machines with zero issues since 4.0. -- -Chuck