From dc7d74be816c4ebe59dd6be454ae565d5cfed036 Mon Sep 17 00:00:00 2001 From: memotype Date: Tue, 3 Jun 2008 17:34:57 +0000 Subject: [PATCH] copycds-cdrom now passes arguments to copycds. also added man(8) page for copycds-cdrom in pod format. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1569 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/copycds-cdrom | 22 ++++++++-------- xCAT-client/pods/man8/copycds-cdrom.8.pod | 31 +++++++++++++++++++++++ 2 files changed, 43 insertions(+), 10 deletions(-) create mode 100644 xCAT-client/pods/man8/copycds-cdrom.8.pod diff --git a/xCAT-client/bin/copycds-cdrom b/xCAT-client/bin/copycds-cdrom index a6aa44376..f572bd9fd 100755 --- a/xCAT-client/bin/copycds-cdrom +++ b/xCAT-client/bin/copycds-cdrom @@ -2,19 +2,21 @@ my $go=1; -if (!@ARGV) -{ - print "No arguments given, assuming /dev/cdrom.\n"; - push @ARGV, "/dev/cdrom"; -} +my $file; +my $opts = ""; -while ($go) -{ +$file = pop @ARGV; +if (!$file) { + print "No device given, assuming /dev/cdrom.\n"; + $file = "/dev/cdrom"; +} + +while ($go) { $go = 0; - system("copycds @ARGV"); + #print "copycds $opts $file"; + system("copycds $opts $file"); print "Would you like to copy another CD (y/N)? "; - if ( =~ /^y/i) - { + if ( =~ /^y/i) { $go = 1; system("eject"); print "Replace the CD and press enter."; diff --git a/xCAT-client/pods/man8/copycds-cdrom.8.pod b/xCAT-client/pods/man8/copycds-cdrom.8.pod new file mode 100644 index 000000000..a399ba920 --- /dev/null +++ b/xCAT-client/pods/man8/copycds-cdrom.8.pod @@ -0,0 +1,31 @@ + +=head1 NAME + +B - Client side wrapper for copycds supporting physical drives. + +=head1 SYNOPSIS + +B I<[copycds options]> I<[drive]> + + +=head1 DESCRIPTION + +B is a wrapper scripts for copycds to copy from physical CD/DVD-ROM drives located on the management server. + +I<[copycds options]> are passed unmolested to copycds. + +If I<[drive]> is not specified, /dev/cdrom is assumed. + +The copycds command copies all contents of Distribution CDs or Service Pack CDs to the install directory as +designated in the B table attribute: B. + +=head1 SEE ALSO + +copycds(8) + + +=head1 AUTHOR + +Isaac Freeman Eifreeman@us.ibm.comE + +