From 1921256e4cbc385c3093c16463b9d043ec86f6ac Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 17 Feb 2010 14:38:03 +0000 Subject: [PATCH] must export the DB2INSTANCE before the connect to the database. This is need particularly for the daemon which cannot get it from the environement git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5230 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 42a121767..26e1af38a 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -715,6 +715,10 @@ sub new $self->{connstring} =~ s/^/dbi:/; #return undef; } + if ($xcatcfg =~ /^DB2:/) { # for DB2 ,export the INSTANCE name + $ENV{'DB2INSTANCE'} = $self->{dbuser}; + } + my $oldumask= umask 0077; unless ($::XCAT_DBHS->{$self->{connstring},$self->{dbuser},$self->{dbpass},$self->{realautocommit}}) { #= $self->{tabname}; $::XCAT_DBHS->{$self->{connstring},$self->{dbuser},$self->{dbpass},$self->{realautocommit}} =