From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 22 11:40:25 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F20C616A4CF for ; Wed, 22 Sep 2004 11:40:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D640E43D46 for ; Wed, 22 Sep 2004 11:40:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8MBeO91057718 for ; Wed, 22 Sep 2004 11:40:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8MBeO3M057717; Wed, 22 Sep 2004 11:40:24 GMT (envelope-from gnats) Resent-Date: Wed, 22 Sep 2004 11:40:24 GMT Resent-Message-Id: <200409221140.i8MBeO3M057717@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mikael Eklund Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D1DD16A4CE for ; Wed, 22 Sep 2004 11:35:34 +0000 (GMT) Received: from mailfe02.swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F15943D31 for ; Wed, 22 Sep 2004 11:35:33 +0000 (GMT) (envelope-from rma@ludd.ltu.se) Received: from [213.100.160.63] (HELO megalagrion.home) by mailfe02.swip.net (CommuniGate Pro SMTP 4.2.1) with ESMTP id 170704124 for FreeBSD-gnats-submit@freebsd.org; Wed, 22 Sep 2004 13:35:32 +0200 Received: from bumblebee.home (bumblebee.home [192.168.253.3]) by megalagrion.home (8.12.3/8.12.3) with ESMTP id i8MBZVRQ030343 for ; Wed, 22 Sep 2004 13:35:32 +0200 (CEST) (envelope-from rma@ludd.ltu.se) Received: from bumblebee.home (localhost [127.0.0.1]) by bumblebee.home (8.13.1/8.13.1) with ESMTP id i8MBZVfE047431 for ; Wed, 22 Sep 2004 13:35:31 +0200 (CEST) (envelope-from rma@ludd.ltu.se) Received: (from rme@localhost) by bumblebee.home (8.13.1/8.13.1/Submit) id i8MBZUff047430; Wed, 22 Sep 2004 13:35:30 +0200 (CEST) (envelope-from rma@ludd.ltu.se) Message-Id: <200409221135.i8MBZUff047430@bumblebee.home> Date: Wed, 22 Sep 2004 13:35:30 +0200 (CEST) From: Mikael Eklund To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: conf/71994: Login shell may unnecessarily print "Exit 1" X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mikael Eklund List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 11:40:25 -0000 >Number: 71994 >Category: conf >Synopsis: Login shell may unnecessarily print "Exit 1" >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Sep 22 11:40:24 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Mikael Eklund >Release: FreeBSD 5.3-BETA4 i386 >Organization: Ludd (Luleå Academic Computer Society) >Environment: System: FreeBSD bumblebee 5.3-BETA4 FreeBSD 5.3-BETA4 #0: Wed Sep 15 05:35:37 CEST 2004 root@bumblebee:/usr/obj/usr/src/sys/BUMBLEBEE i386 tcsh-6.13.00 >Description: Under some rare circumstances your login shell may greet you with the single line: Exit 1 followed by your command prompt. To me, this looks scary and it made me wonder what went wrong. The problem is in the file /usr/share/skel/dot.login, that uses /bin/[ rather than a csh-syntax if-clause that always returns true (0), even if the test fails. >How-To-Repeat: Install a minimum distribution set, or at least one that does not include /usr/games/fortune. In your ~/.cshrc file, set the shell variable $printexitvalue. Log in, or start a new login terminal window: "xterm -ls". At login, the test for /usr/games/fortune will become false. Thus /bin/[ will return a status code of 1. This will be reported by tcsh, printing "Exit 1" alerting the user that something went wrong. >Fix: Apply the following patch. --- patch begins here --- --- share/skel/dot.login.old Sat Sep 11 14:29:27 2004 +++ share/skel/dot.login Wed Sep 15 04:49:15 2004 @@ -5,4 +5,4 @@ # see also csh(1), environ(7). # -[ -x /usr/games/fortune ] && /usr/games/fortune freebsd-tips +if ( -x /usr/games/fortune ) /usr/games/fortune freebsd-tips --- patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: