From d84297439097689b64ecb3a054c7cba2752371df Mon Sep 17 00:00:00 2001 From: sakolish Date: Mon, 19 Nov 2007 18:43:11 +0000 Subject: [PATCH] Changed regexp to look for "hmc" instead of rcons.hmc git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@60 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/usr/share/xcat/cons/hmc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xCAT-server-2.0/usr/share/xcat/cons/hmc b/xCAT-server-2.0/usr/share/xcat/cons/hmc index e598dc1b8..389451341 100644 --- a/xCAT-server-2.0/usr/share/xcat/cons/hmc +++ b/xCAT-server-2.0/usr/share/xcat/cons/hmc @@ -4,8 +4,6 @@ use strict; use Getopt::Long; use xCAT::Table; -use Expect; -use xCAT::PPCcli; use xCAT::PPCcli qw(SUCCESS EXPECT_ERROR RC_ERROR NR_ERROR); @@ -40,7 +38,7 @@ sub parse_args { local *usage = sub { my $cmd = __FILE__; - $cmd =~ s/(.*)(rcons.[\w]{3})/$2/; + $cmd =~ s/.*([\w]{3}$)/$1/; if ( defined( $_[0] )) { print STDERR "$_[0]\n"; @@ -148,7 +146,7 @@ sub invoke_cmd { # Get node power type ################################## my $hwtype = __FILE__; - $hwtype =~ s/(.*)([\w]{3})/$2/; + $hwtype =~ s/.*([\w]{3})$/$1/; ################################# # Get node type @@ -240,3 +238,4 @@ if ( $result ne "0" ) { } exit(0); +