Suppress error output when omitting iscsi username and password from table (banking on host-based authentication)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@855 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-03-20 17:38:25 +00:00
parent 51d8830fb2
commit b7e516b8ca
6 changed files with 10 additions and 6 deletions

View File

@ -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#";
}

View File

@ -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?

View File

@ -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?

View File

@ -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?

View File

@ -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?

View File

@ -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?