Hiya ppl,

Im running a script every night. It tar's a few crucial directories and then makes them 'gpg:ed' with no encryption but with a password. But I get the error you can see below last in the mail-output from the cron job:

"
`/data/backup/soderlund-bind.tgz.gpg' -> `/data/backup/old/soderlund-bind.tgz.gpg'
`/data/backup/soderlund-etc.tgz.gpg' -> `/data/backup/old/soderlund-etc.tgz.gpg'
`/data/backup/soderlund-home.tgz.gpg' -> `/data/backup/old/soderlund-home.tgz.gpg'
`/data/backup/soderlund-usr.tgz.gpg' -> `/data/backup/old/soderlund-usr.tgz.gpg'
`/data/backup/soderlund-www.tgz.gpg' -> `/data/backup/old/soderlund-www.tgz.gpg'
tar: Removing leading `/' from member names
[snip]
usr/X11R6/lib/libICE.so.6
tar: Removing leading `/' from member names
home
gpg: cannot open /dev/tty: No such device or address
gpg: cannot open /dev/tty: No such device or address
gpg: cannot open /dev/tty: No such device or address
gpg: cannot open /dev/tty: No such device or address
gpg: cannot open /dev/tty: No such device or address
"

The script does the following:

"


#!/bin/sh
# Niclas S Techtrade 2002-06-20
#
cp -v /data/backup/*.gpg /data/backup/old
tar cvzf /data/backup/soderlund-etc.tgz /etc
tar cvzf /data/backup/soderlund-bind.tgz /etc/bind
tar cvzf /data/backup/soderlund-www.tgz /data/www
tar cvzf /data/backup/soderlund-usr.tgz /usr
tar cvzf /data/backup/soderlund-home.tgz /home
/bin/echo password | /usr/bin/gpg -c --yes --passphrase-fd 0 /data/backup/soderlund-etc.tgz
/bin/echo password | /usr/bin/gpg -c --yes --passphrase-fd 0 /data/backup/soderlund-bind.tgz
/bin/echo password | /usr/bin/gpg -c --yes --passphrase-fd 0 /data/backup/soderlund-www.tgz
/bin/echo password | /usr/bin/gpg -c --yes --passphrase-fd 0 /data/backup/soderlund-usr.tgz
/bin/echo password | /usr/bin/gpg -c --yes --passphrase-fd 0 /data/backup/soderlund-home.tgz
# Done
"

Any ideas what I can do to get rid of the open tty errors?

Regards,

Niclas

(PS - if I run the script manually it works fine and takes the pipe fine - DS)

|_|_|_|_| Niclas Söderlund
|_|_|_|_| All work and no play makes Jack a dull boy


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to