I need to write a rsync script to run at periodic intervals if eth0 is set to a certain ethernet address and a certain host is reachable.
For instance, when the laptop on which the cron script will be run is on the office network and has an eth0 address of 10.0.0.200 (say), and host 10.0.0.2 is available, the script will proceed with the attempted rsync. I'm trying to learn a little bash, and want to know if there is a more elegant way than calling '/sbin/ifconfig eth0' and 'ping -c2 10.0.0.2' and parsing the results with perl. Small addendum: Is it possible to allow a particular host to connect and run an rsync session without a password, without running rsync on the server in daemon mode? I'm using rsync over ssh. Thanks Rory -- Rory Campbell-Lange <[EMAIL PROTECTED]> <www.campbell-lange.net> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]