From ce3681220400c563c1fcc7ee37e9f5825eef6481 Mon Sep 17 00:00:00 2001 From: wuzhy Date: Mon, 1 Feb 2010 03:50:36 +0000 Subject: [PATCH] Add a new option "r" for rmvm to remain the node's definition when removing it. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5095 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCvm.pm | 4 ++-- xCAT-client/pods/man1/rmvm.1.pod | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/PPCvm.pm b/perl-xCAT/xCAT/PPCvm.pm index bf7505f8e..917e7a0ac 100644 --- a/perl-xCAT/xCAT/PPCvm.pm +++ b/perl-xCAT/xCAT/PPCvm.pm @@ -379,7 +379,7 @@ sub rmvm_parse_args { $Getopt::Long::ignorecase = 0; Getopt::Long::Configure( "bundling" ); - if ( !GetOptions( \%opt, qw(V|verbose service) )) { + if ( !GetOptions( \%opt, qw(V|verbose service r) )) { return( usage() ); } #################################### @@ -711,7 +711,7 @@ sub remove { ################################ # Remove LPAR from database ################################ - if ( $Rc == SUCCESS ) { + if ( $Rc == SUCCESS and !exists( $opt->{r} ) ) { my $err = xCATdB( "rmvm", $name ); if ( defined( $err )) { push @values, [$lpar,$err,RC_ERROR]; diff --git a/xCAT-client/pods/man1/rmvm.1.pod b/xCAT-client/pods/man1/rmvm.1.pod index d9f8e884f..b7e74dd3d 100644 --- a/xCAT-client/pods/man1/rmvm.1.pod +++ b/xCAT-client/pods/man1/rmvm.1.pod @@ -9,7 +9,7 @@ I I -I +I =head1 DESCRIPTION @@ -25,6 +25,8 @@ B<-v> Command Version. B<-V> Verbose output. +B<-r> Remain the data object definitions of the nodes. + B<--service> Remove the service partitions of the specified CECs. @@ -63,6 +65,14 @@ Output is similar to: cec01: Success cec02: Success +4. To remove the partition lpar1, but remaining its definition, enter: + +I + +Output is similar to: + +lpar1: Success + =head1 FILES