diff --git a/perl-xCAT-2.0/xCAT/Template.pm b/perl-xCAT-2.0/xCAT/Template.pm index 7a2f59913..910cea69b 100755 --- a/perl-xCAT-2.0/xCAT/Template.pm +++ b/perl-xCAT-2.0/xCAT/Template.pm @@ -70,6 +70,7 @@ sub subvars { #ok, now do everything else.. $inc =~ s/#COMMAND:([^#]+)#/command($1)/eg; $inc =~ s/#TABLE:([^:]+):([^:]+):([^#]+)#/tabdb($1,$2,$3)/eg; + $inc =~ s/#TABLEBLANKOKAY:([^:]+):([^:]+):([^#]+)#/tabdb($1,$2,$3,'1')/eg; $inc =~ s/#CRYPT:([^:]+):([^:]+):([^#]+)#/crydb($1,$2,$3)/eg; $inc =~ s/#XCATVAR:([^#]+)#/envvar($1)/eg; $inc =~ s/#ENV:([^#]+)#/envvar($1)/eg; @@ -156,6 +157,7 @@ sub tabdb my $table = shift; my $key = shift; my $field = shift; + my $blankok = shift; my $tabh = xCAT::Table->new($table); unless ($tabh) { $tmplerr="Unable to open table named $table"; @@ -179,7 +181,9 @@ sub tabdb } $tabh->close; unless($ent and defined($ent->{$field})) { - $tmplerr="Unable to find requested $field from $table in this context"; + unless ($blankok) { + $tmplerr="Unable to find requested $field from $table in this context"; + } return ""; #return "#TABLEBAD:$table:field $field not found#"; } diff --git a/xCAT-server-2.0/share/xcat/install/centos/iscsi.tmpl b/xCAT-server-2.0/share/xcat/install/centos/iscsi.tmpl index 73beb37ed..14fdcc81d 100644 --- a/xCAT-server-2.0/share/xcat/install/centos/iscsi.tmpl +++ b/xCAT-server-2.0/share/xcat/install/centos/iscsi.tmpl @@ -33,7 +33,7 @@ key --skip # iscsiname #TABLE:nodelist:$NODE:node# -iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLE:iscsi:$NODE:userid#" --password "#TABLE:iscsi:$NODE:passwd#" +iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLEBLANKOKAY:iscsi:$NODE:userid#" --password "#TABLEBLANKOKAY:iscsi:$NODE:passwd#" #No RAID #/boot really significant for this sort of setup nowadays? diff --git a/xCAT-server-2.0/share/xcat/install/fedora/iscsi.ppc64.tmpl b/xCAT-server-2.0/share/xcat/install/fedora/iscsi.ppc64.tmpl index 5793a7c24..2e03f88ce 100644 --- a/xCAT-server-2.0/share/xcat/install/fedora/iscsi.ppc64.tmpl +++ b/xCAT-server-2.0/share/xcat/install/fedora/iscsi.ppc64.tmpl @@ -33,7 +33,7 @@ clearpart --all --initlabel # iscsiname #TABLE:nodelist:$NODE:node# -iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLE:iscsi:$NODE:userid#" --password "#TABLE:iscsi:$NODE:passwd#" +iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLEBLANKOKAY:iscsi:$NODE:userid#" --password "#TABLEBLANKOKAY:iscsi:$NODE:passwd#" #No RAID #/boot really significant for this sort of setup nowadays? diff --git a/xCAT-server-2.0/share/xcat/install/fedora/iscsi.tmpl b/xCAT-server-2.0/share/xcat/install/fedora/iscsi.tmpl index f95ceda14..e9a155441 100644 --- a/xCAT-server-2.0/share/xcat/install/fedora/iscsi.tmpl +++ b/xCAT-server-2.0/share/xcat/install/fedora/iscsi.tmpl @@ -33,7 +33,7 @@ clearpart --all --initlabel # iscsiname #TABLE:nodelist:$NODE:node# -iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLE:iscsi:$NODE:userid#" --password "#TABLE:iscsi:$NODE:passwd#" +iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLEBLANKOKAY:iscsi:$NODE:userid#" --password "#TABLEBLANKOKAY:iscsi:$NODE:passwd#" #No RAID #/boot really significant for this sort of setup nowadays? diff --git a/xCAT-server-2.0/share/xcat/install/rh/iscsi.ppc64.tmpl b/xCAT-server-2.0/share/xcat/install/rh/iscsi.ppc64.tmpl index 9729fe7df..be00dde9c 100644 --- a/xCAT-server-2.0/share/xcat/install/rh/iscsi.ppc64.tmpl +++ b/xCAT-server-2.0/share/xcat/install/rh/iscsi.ppc64.tmpl @@ -33,7 +33,7 @@ key --skip # iscsiname #TABLE:nodelist:$NODE:node# -iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLE:iscsi:$NODE:userid#" --password "#TABLE:iscsi:$NODE:passwd#" +iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLEBLANKOKAY:iscsi:$NODE:userid#" --password "#TABLEBLANKOKAY:iscsi:$NODE:passwd#" #No RAID #/boot really significant for this sort of setup nowadays? diff --git a/xCAT-server-2.0/share/xcat/install/rh/iscsi.tmpl b/xCAT-server-2.0/share/xcat/install/rh/iscsi.tmpl index 65051f9d9..fb7d73579 100644 --- a/xCAT-server-2.0/share/xcat/install/rh/iscsi.tmpl +++ b/xCAT-server-2.0/share/xcat/install/rh/iscsi.tmpl @@ -33,7 +33,7 @@ key --skip # iscsiname #TABLE:nodelist:$NODE:node# -iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLE:iscsi:$NODE:userid#" --password "#TABLE:iscsi:$NODE:passwd#" +iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLEBLANKOKAY:iscsi:$NODE:userid#" --password "#TABLEBLANKOKAY:iscsi:$NODE:passwd#" #No RAID #/boot really significant for this sort of setup nowadays?