diff options
author | nate <nate@FreeBSD.org> | 1996-05-18 20:30:04 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1996-05-18 20:30:04 +0000 |
commit | 44df49b4536a35c7bf54ae9eaa3b4c33942dbf37 (patch) | |
tree | 1c45cd09375e360e4bbc63012260d7ced835f1de /etc | |
parent | 48c7921229adb774573ec2bf35cde958636a4578 (diff) | |
download | FreeBSD-src-44df49b4536a35c7bf54ae9eaa3b4c33942dbf37.zip FreeBSD-src-44df49b4536a35c7bf54ae9eaa3b4c33942dbf37.tar.gz |
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.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/weekly | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,7 +1,7 @@ #!/bin/sh - # # @(#)weekly 5.14 (Berkeley) 6/23/91 -# $Id: weekly,v 1.14 1996/05/12 21:10:34 wosch Exp $ +# $Id: weekly,v 1.15 1996/05/13 22:05:10 wosch Exp $ PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/libexec export PATH @@ -46,7 +46,7 @@ echo "" echo "Rebuilding locate database:" locdb=/var/db/locate.database touch ${locdb}; chown nobody ${locdb}; chmod 644 ${locdb} -echo /usr/libexec/locate.updatedb | nice -5 su -m nobody 2>&1 |\ +echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody 2>&1 |\ fgrep -v 'Permission denied' chmod 444 ${locdb} @@ -58,7 +58,7 @@ makewhatis.local "${MANPATH}" #echo "" #echo "Reformatting manual pages:" -#echo catman.local "${MANPATH}" | su -m man +#echo catman.local "${MANPATH}" | su -fm man echo "" echo "Cleaning up kernel database files:" |