Re: Can't execute star cronjob
| Newsgroups | gmane.comp.archivers.star.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
> Opcije="-fifostats -multivol -time"
> BlockSize=8m
> FifoSize=128m
> TapeDev="/tmp/arhiva.star"
> Log="/tmp/tblib-$BckStart.log"
> star -c bs="$BlockSize" fs="$FifoSize" $Opcije -V pat=firmware/\* -V \
> pat=security/\* f="$TapeDev" . 2>> "$Log"
>
> So, my cronjob (only for this test purpose) will execute every minute.
> Result is mail message with following in attachment:
> star: No such device or address. Cannot open '/dev/tty'.
>
> Why I am getting this "star: No such device or address. Cannot open
> '/dev/tty'." error?
I fgrep'ed for "/dev/tty" in star-1.5/star/*.c and found
if (interactive || ask_remove ||
((multivol || tsize > 0) && !newvol_script)) {
...
if ((tty = fileopen("/dev/tty", "r")) == (FILE *)NULL)
comerr("Cannot open '/dev/tty'.\n");
which leads me to the theory that your option "-multivol" is the
reason why star prepares to ask you for an eventual second tape.
If you really want to handle multivolume archives under cron
then you will have to find a different solution.
For example pop up a terminal window from cron and run your script there.
...set necessary environment...
xterm -e ...your.script...
In similar situations i made the script finally sleep 86400 seconds
in order to keep the window open for at most a day. Ctrl+C by the
operator does end its life.
Looks like an interesting but site specific problem. Got a tape
changer ? ... or an overnight operator with ia cell phone ? :))
Have a nice day :)
Thomas