diff --git a/check_postgres.pl b/check_postgres.pl index 3851d8f2..0e4863ee 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -26,6 +26,7 @@ package check_postgres; use File::Temp qw/tempfile tempdir/; File::Temp->safe_level( File::Temp::MEDIUM ); use Cwd; +use Cwd 'abs_path'; use Data::Dumper qw/Dumper/; $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; @@ -4995,6 +4996,12 @@ sub check_disk_space { my $xlog = "$datadir/pg_xlog"; if (-l $xlog) { my $linkdir = readlink($xlog); + + ## Handle relative symbolic links + if ($linkdir =~ m|^\.|) { + $linkdir = abs_path("$datadir/$linkdir"); + } + $dir{$linkdir} = 1 if ! exists $dir{$linkdir}; } }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: