mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 13:22:36 +00:00 
			
		
		
		
	More reasonable error message when open() file failed.
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user