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); +