version 1.5, 2005/12/07 17:31:04
|
version 1.7, 2008/09/10 12:59:45
|
Line 16 $|=1;
|
Line 16 $|=1;
|
# |
# |
|
|
# program version |
# program version |
my $version = "0.4.2 (7.12.2005 ROC)"; |
my $version = "0.4.4 (10.9.2008 ROC)"; |
|
|
# read command line parameters |
# read command line parameters |
my $args = parseargs; |
my $args = parseargs; |
Line 205 sub run_query {
|
Line 205 sub run_query {
|
$archcmd .= " -description='$archname'"; |
$archcmd .= " -description='$archname'"; |
$archcmd .= " '$dirquery'"; |
$archcmd .= " '$dirquery'"; |
|
|
|
logger('INFO', "querying TSM server for $dirquery, please wait..."); |
my $archcnt = 0; |
my $archcnt = 0; |
print LOG "CMD: $archcmd\n"; |
print LOG "CMD: $archcmd\n"; |
if (open ARCH, "$archcmd 2>&1 |") { |
if (open ARCH, "$archcmd 2>&1 |") { |
Line 342 sub compare_files {
|
Line 343 sub compare_files {
|
logger("INFO", "archivecheck $version"); |
logger("INFO", "archivecheck $version"); |
|
|
# make shure the right user is running this program |
# make shure the right user is running this program |
my $user = getlogin; |
my $user = getlogin || getpwuid($<) ; |
if (not (($user eq "archive")||($user eq "root"))) { |
if (not (($user eq "archive")||($user eq "root"))) { |
logger("ABORT", "you must be archive or root user to run this program!"); |
logger("ABORT", "you must be archive or root user to run this program!"); |
exit 1; |
exit 1; |