mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-20 01:16:14 +00:00
Updated VersionCheck and Pingback to work on Windows
This commit is contained in:
@@ -314,7 +314,7 @@ sub update_checks_file {
|
|||||||
|
|
||||||
sub _touch {
|
sub _touch {
|
||||||
my ($file) = @_;
|
my ($file) = @_;
|
||||||
sysopen my $fh, $file, O_WRONLY|O_CREAT|O_NONBLOCK
|
sysopen my $fh, $file, O_WRONLY|O_CREAT
|
||||||
or die "Cannot create $file : $!";
|
or die "Cannot create $file : $!";
|
||||||
close $fh or die "Cannot close $file : $!";
|
close $fh or die "Cannot close $file : $!";
|
||||||
utime(undef, undef, $file);
|
utime(undef, undef, $file);
|
||||||
|
@@ -125,12 +125,13 @@ sub valid_item {
|
|||||||
sub get_os_version {
|
sub get_os_version {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
chomp(my $platform = `uname -s`);
|
if ( $OSNAME eq 'MSWin32' ) {
|
||||||
PTDEBUG && _d('platform:', $platform);
|
require Win32;
|
||||||
if ( !$platform ) {
|
|
||||||
return $OSNAME if $OSNAME ne 'MSWin32';
|
|
||||||
return Win32::GetOSDisplayName();
|
return Win32::GetOSDisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chomp(my $platform = `uname -s`);
|
||||||
|
PTDEBUG && _d('platform:', $platform);
|
||||||
return $OSNAME unless $platform;
|
return $OSNAME unless $platform;
|
||||||
|
|
||||||
chomp(my $lsb_release
|
chomp(my $lsb_release
|
||||||
|
Reference in New Issue
Block a user