From bdf7d0f41c5d328da1be5a5611a3ee90cb3a611f Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 20 Mar 2008 14:45:08 +0000 Subject: [PATCH] Add manpage and usage and version to packimage git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@852 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client-2.0/pods/man1/packimage.1.pod | 4 +++- xCAT-server-2.0/lib/xcat/plugins/packimage.pm | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/xCAT-client-2.0/pods/man1/packimage.1.pod b/xCAT-client-2.0/pods/man1/packimage.1.pod index 49d8e74dc..86cefd124 100644 --- a/xCAT-client-2.0/pods/man1/packimage.1.pod +++ b/xCAT-client-2.0/pods/man1/packimage.1.pod @@ -9,7 +9,7 @@ I I -I +I =head1 DESCRIPTION @@ -33,6 +33,8 @@ B<-p> Profile (compute,service) B<-a> Architecture (ppc64,x86_64,etc) +B<-m> Method (default cpio) + =head1 RETURN VALUE diff --git a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm index 8cb82d59b..013087ee4 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm @@ -33,8 +33,18 @@ sub process_request { "profile|p=s" => \$profile, "arch|a=s" => \$arch, "osver|o=s" => \$osver, - "method|m=s" => \$method + "method|m=s" => \$method, + "help|h" => \$help, + "version|v" => \$version ); + if ($version) { + $callback->({info=>["Version 2.0"]}); + return; + } + if ($help) { + $callback->({info=>["packimage -h \npackimage -v \npackimage [-p profile] [-a architecture] [-o OS] [-m method]\n"]}); + return; + } my $distname = $osver; until (-r "$::XCATROOT/share/xcat/netboot/$distname/" or not $distname) { chop($distname);