From fd0e6aa3e3630d78f37e5548ad3b476ac65064e5 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Mon, 20 Mar 2017 14:59:23 +0800 Subject: [PATCH] More reasonable error message when open() file failed. --- xCAT-test/autotest/testcase/installation/pre_deploy_sn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/installation/pre_deploy_sn b/xCAT-test/autotest/testcase/installation/pre_deploy_sn index d46f49564..a4c30001a 100755 --- a/xCAT-test/autotest/testcase/installation/pre_deploy_sn +++ b/xCAT-test/autotest/testcase/installation/pre_deploy_sn @@ -20,7 +20,7 @@ if ($ENV{XCAT_DATABASE} eq "PostgreSQL") { $cmd = "XCATPGPW=12345 /opt/xcat/bin/pgsqlsetup -i -V"; runcmd("$cmd"); - open(my $fh, '>>', '/var/lib/pgsql/data/pg_hba.conf') or die; + open(my $fh, '>>', '/var/lib/pgsql/data/pg_hba.conf') or die("failed open file /var/lib/pgsql/data/pg_bha.conf"); print $fh "host all all 0.0.0.0/0 md5\n"; print $fh "host all all ::0/0 md5\n"; close $fh;