From 9a7b4ff7ff1ef3de9cdf665826a6999ec6c02bbb Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 8 Sep 2010 18:58:59 +0000 Subject: [PATCH] allow underscore in user defined tables and sql file names, note more work needed if want to allow test_x_mysql.pm for a name git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7383 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/ExtTab.pm | 11 ++++++++--- perl-xCAT/xCAT/Table.pm | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/ExtTab.pm b/perl-xCAT/xCAT/ExtTab.pm index d54d82bd5..7b865aa21 100644 --- a/perl-xCAT/xCAT/ExtTab.pm +++ b/perl-xCAT/xCAT/ExtTab.pm @@ -194,17 +194,22 @@ sub get_filelist my $filename= basename($file); # strip filename my($name,$ext1) = split '\.', $filename; my($name,$ext2) = split '\_', $name; - if ($ext2 eq $dbname) + if ($ext2 eq $dbname) # matches the database { push @filelist, $file; } else { - if ($ext2 eq "") + if ($ext2 eq "") # no database designated { push @filelist, $file; + } else { # if not one of the databases, they just have _ in + # the file name + if ($ext2 ne "db2" && $ext2 ne "mysql" && $ext2 ne "pgsql" && $ext2 ne "sqlite" ) { + push @filelist, $file; + } } - } + } $ext2 = ""; $ext1 = ""; } diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 540ed6e85..443851a6e 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -3626,6 +3626,11 @@ sub get_filelist if ($ext2 eq "") { push @filelist, $file; + } else { # if not one of the databases, they just have _ in + # the file name + if ($ext2 ne "db2" && $ext2 ne "mysql" && $ext2 ne "pgsql" && $ext2 ne "sqlite" ) { + push @filelist, $file; + } } } $ext2 = "";