From 5e23b7fd49c7be5271bffa28ad518ee2c859632e Mon Sep 17 00:00:00 2001 From: sakolish Date: Thu, 20 Dec 2007 15:28:28 +0000 Subject: [PATCH] Changed getmacs output formatting - Line #301 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@196 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/PPCmac.pm | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/PPCmac.pm b/perl-xCAT-2.0/xCAT/PPCmac.pm index 5665bf16b..5fde4a69a 100644 --- a/perl-xCAT-2.0/xCAT/PPCmac.pm +++ b/perl-xCAT-2.0/xCAT/PPCmac.pm @@ -25,7 +25,7 @@ sub parse_args { return( [ $_[0], "getmacs -h|--help", "getmacs -v|--version", - "getmacs [-V|--verbose] noderange [-S server -G gateway -C client]", + "getmacs [-V|--verbose] noderange [-c][-S server -G gateway -C client]", " -h writes usage information to standard output", " -v displays command version", " -c colon seperated output", @@ -286,24 +286,24 @@ sub getmacs { ################################## # lpar_netboot returns: # - # Connecting to lpar4\r\n - # Connected\r\n - # Checking for power off.\r\n - # Power off complete.\r\n - # Power on lpar4 to Open Firmware.\r\n - # Power on complete.\r\n - # Getting adapter location codes.\r\n - # Type\t Location Code\t MAC Address\t Full Path Name\t - # Ping Result\t Device Type\r\nent U9117.MMA.10F6F3D-V5-C3-T1 - # 1e0e122a930d /vdevice/l-lan@30000003 virtual\r\n + # # Connecting to lpar4\n + # # Connected\n + # # Checking for power off.\n + # # Power off complete.\n + # # Power on lpar4 to Open Firmware.\n + # # Power on complete.\n + # # Getting adapter location codes.\n + # # Type\t Location Code\t MAC Address\t Full Path Name\tPing Result\n + # ent U9117.MMA.10F6F3D-V5-C3-T1 1e0e122a930d /vdevice/l-lan@30000003 # - # Note that "Device Type" above appears - # with some versions of lpar_netboot - # and not with others. ##################################### my $values; foreach ( @$result ) { - $values.= "\n$_"; + if ( /^#\s*Type/ ) { + $values.= "\n$_\n"; + } elsif ( /^[^#]/ ) { + $values.= "$_\n"; + } } return( [[$name,$values]] ); }