From owner-cvs-etc Sat May 18 13:30:42 1996 Return-Path: owner-cvs-etc Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA18726 for cvs-etc-outgoing; Sat, 18 May 1996 13:30:42 -0700 (PDT) Received: (from nate@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA18679; Sat, 18 May 1996 13:30:12 -0700 (PDT) Date: Sat, 18 May 1996 13:30:12 -0700 (PDT) From: Nate Williams Message-Id: <199605182030.NAA18679@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-etc Subject: cvs commit: src/etc weekly Sender: owner-cvs-etc@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk nate 96/05/18 13:30:10 Modified: etc weekly Log: Fixed *annoying* error with the weekly files. Do you get these whenver /etc/weekly is run? Rebuilding locate database: stty: stdin isn't a terminal TERM: Undefined variable. 'su' apparently runs in root's environment before doing a seteuid(), so it reads root's .cshrc. The problem lies in the fact that $prompt is *always* set by the time the command is executed, so you can't protect your interactive commands from the non-interactive commands by the normal: if ($?prompt) then # interactive stuff here endif Set the -f flag (su -fm) which causes it not to read root's .cshrc file, since there should be no reason to do so for these scripts since /etc/crontab sets up all of the necessary environment. Revision Changes Path 1.16 +3 -3 src/etc/weekly