1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#! perl
if ( ! ( defined eval "require 5.005" ) )
{
die "GPT requires at least Perl version 5.005";
}
my $gpath = $ENV{GPT_LOCATION};
if (!defined($gpath))
{
$gpath = "/usr";
}
if (!defined($gpath))
{
error_out("GPT_LOCATION needs to be set before running this script");
}
@INC = ("$gpath/lib/perl", "$gpath/lib/perl/$Config{'archname'}", @INC);
system("$gpath/sbin/gpt_version") == 0
or die "GPT died due to Version mismatch. Check PATH and GPT_LOCATION\n" ;
if ( ! ( defined eval "require Grid::GPT::GPTObject" ) )
{
die("$gpath does not appear to hold a valid GPT installation\n");
}
print "WARNING: gpt-update will soon be depreciated. Use gpt-install instead.\n";
sleep 1;
my @sysArgs = ( "$gpath/sbin/gpt-install", @ARGV );
system( @sysArgs ) == 0 or print STDERR "couldn't exec gpt-install: $!\n";
exit;
|