Im trying to write a small backup script which I have put in 
/etc/periodic/weekly. The script is as follows......
   
  #!/bin/sh
#
#weekly backup of chosen files
#
if
then
        tar -cf /dev/sa0 /var/ftp /home /etc /usr/local
        echo "backing up the disks"
else
        echo "There was a problem" 1>&2
        exit 1
fi
  echo "Finished at `/bin/date`."
exit

   
  Now I have no experience at bash scripting as was wonderng if someone could 
give me some help with the if statement. Basically im trying to test to see if 
the machine knows that /dev/sa0 (my tape drive) is accessable. If it is then it 
continus to the backup, if not then it gives the error message and echos the 
date.
   
  Any help would be much appreciated.


                
---------------------------------
 New Yahoo! Mail is the ultimate force in competitive emailing. Find out more 
at the Yahoo! Mail Championships. Plus: play games and win prizes.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to