From bc7f0306600594916e3a991b2bd6aaa513fac033 Mon Sep 17 00:00:00 2001 From: sakolish Date: Wed, 16 Apr 2008 18:14:31 +0000 Subject: [PATCH] Grouped /^(mm|rsa)$/ in regexp git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1102 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/lsslp.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm b/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm index feacff62a..2ea68b5ac 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm @@ -954,7 +954,7 @@ sub xCATdB { lc($type),$name,$id,$model,$serial,$name,$prof,$frame,$ips ); xCAT::PPCdb::add_ppc( $type, [$values] ); } - elsif ( $type =~ /^HMC|IVM$/ ) { + elsif ( $type =~ /^(HMC|IVM)$/ ) { my $model = @$data[1]; my $serial = @$data[2]; my $ips = @$data[3]; @@ -1017,7 +1017,7 @@ sub xCATdB { $type,$name,$cageid,$model,$serial,$server,$prof,$frame,$ips ); xCAT::PPCdb::add_ppc( "fsp", [$values] ); } - elsif ( $type =~ /^RSA|MM$/ ) { + elsif ( $type =~ /^(RSA|MM)$/ ) { xCAT::PPCdb::add_systemX( $type, $data ); } } @@ -1060,8 +1060,8 @@ sub format_stanza { $d = "$type,all"; } elsif ( /^mgt$/ ) { $d = $mgt{$type}; - } elsif ( /^id|mpa$/ ) { - if ( $type =~ /^mm|rsa$/ ) { + } elsif ( /^(id|mpa)$/ ) { + if ( $type =~ /^(mm|rsa)$/ ) { $d = (/^id$/) ? "0" : $name; } else { next; @@ -1110,8 +1110,8 @@ sub format_xml { $d = "$type,all"; } elsif ( /^mgt$/ ) { $d = $mgt{$type}; - } elsif ( /^id|mpa$/ ) { - if ( $type =~ /^mm|rsa$/ ) { + } elsif ( /^(id|mpa)$/ ) { + if ( $type =~ /^(mm|rsa)$/ ) { $d = (/^id$/) ? "0" : $name; } else { next;