I'm writting a backups script that runs from the general purpose server to 6 workstations.
#!/usr/local/bin/perl
$machine=$ARGV[0];
%runt=(
"local" , "yes",
"tape" , "/dev/nrmt0h",
"dev1" , "/dev/rz0a",
"dev2" , "/dev/rz0g",
"dev3" , "/dev/vol/rootdg/us_striped",
"dump", "/usr/sbin/dump 5bdsuf 64 61000 6100");
$status=system("rsh $machine mt -f $$machine{tape} online");
$status will be 0 unless the remote machine is down.
I was wondering if there was a way to get the return status of the "mt -f" command.
Is there a better way/module for doing this?