> From: "Hoffman, Micah (NCI)" <[EMAIL PROTECTED]>
> Date: Wed, 06 Dec 2000 14:28:18 -0500
> Subject: First time post - cron error message - help needed
>
> I just began to run rsync on a couple of my servers (Solaris 7). I'm
> running the following as a cron job on server 2 every hour to sync server 2
> with server 1:
>
> /usr/local/bin/rsync -vvaxuz --stats --progress --delete \
> --rsh=/usr/local/bin/ssh server1:/share/* /share/ \
> 2>&1 >> /rsync_log.log
>
> When it runs, it does work but I get the following error sent to me:
>
> You have no controlling terminal.Can't initialize readline for
> confirmations.
Sounds like your shell startup files are trying to do some terminal I/O. What is in
your /etc/profile and .profile (or equivalent files for whatever shell you use)?? Are
you doing any IO to the terminal in those?? If so, you will have to write them in a
way that no terminal IO is done on a non-login shell. For example, in my .cshrc for
my tcsh shell, I have the following:
if ($?prompt) then
stty erase '^H' kill '^U' intr '^C' eof '^D'
if ("$gid" == "1") then
set prompt = "`hostname | cut -f1 -d.`($USER)[\!] `pwd` [#] "
alias cd 'cd \!*; set prompt="`hostname | cut -f1 -d.`($USER)[\\!] `pwd` [#]
"'
else
set prompt = "`hostname | cut -f1 -d.`($USER)[\!] `pwd` [%] "
alias cd 'cd \!*; set prompt="`hostname | cut -f1 -d.`($USER)[\\!] `pwd` [%]
"'
endif
source /etc/alias
endif
If the shell is a login shell, the $prompt var is set. If it is not a login shell,
that var is not set, and the code in the "if ($?prompt) then" statement does not get
executed.
David McCabe Unix System Administrator
Le Groupe Videotron [EMAIL PROTECTED] (514) 380 4433
Our bombs are smarter than the average high school student.
At least they can find Kuwait.