From b5f85f793354b624a9aeca677f78ddb27a85d8a7 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 19 Mar 2007 21:42:31 +0000 Subject: [PATCH] 2007-03-19 21:42:31 by steve Added brief help section. TODO: Finish. --- bin/xen-create-nfs | 114 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 109 insertions(+), 5 deletions(-) diff --git a/bin/xen-create-nfs b/bin/xen-create-nfs index d43b344..8fba58d 100755 --- a/bin/xen-create-nfs +++ b/bin/xen-create-nfs @@ -1,7 +1,111 @@ #!/usr/bin/perl -w -# -# TODO: Document. -# + +=head1 NAME + +xen-create-nfs - Create a Xen configuration file for an NFS-root guest. + +=head1 SYNOPSIS + + xen-create-nfs [options] + + Help Options: + --help Show help information. + --manual Read the manual for this script. + --version Show the version information and exit. + --verbose Show diagnostic output. + + Networking Options: + --broadcast The broadcast address to use when configured with a static IP. + --dhcp Configure the guest to use DHCP for IP allocation. + --gateway The gateway address to use when configured with a static IP. + --hostname The hostname to configure for the guest. + --netmask The netmask to use when configured with a static IP. + --ip The IP address to use when configured with a static IP. + + General options: + --admins Specify which users should be setup as xen-shell admins. + --force Force the overwriting of an existing configuration file. + --initrd Specify the initial ramdisk for the guest. + --kernel Specify the kernel to use for the guest. + --memory Specify the memory to allocate for this guest. + --mac Specify the MAC address to use for the guest. + --template Specify an alternative template file to use. + + NFS options: + --nfs_server Specify the NFS server to mount the root partition from. + --nfs_root Specify the path, upon the NFS server, to mount. + +=cut + + +=head1 OPTIONS + +=over 8 + +=item B<--help> +Show help information. + +=item B<--hostname> +Specify the hostname to delete. + +=item B<--manual> +Read the manual for this script. + +=item B<--version> +Show the version number and exit. + + +=back + +=cut + + +=head1 DESCRIPTION + + xen-create-nfs is a simple script which allows you to easily create + a single configuration file for a Xen guest which will mount its remote + filesystem over an NFS root. + + It doesn't create any images to use for local storage, and it doesn't + support more than the minimal number of options to completement the + existing xen-create-image script, however it is hopefully useful. + +=cut + + +=head1 REFERENCE + + For more details on what you'll need to support NFS-root Xen guests + the following article, written by the author, might be useful: + + http://www.debian-administration.org/articles/505 + +=cut + + +=head1 AUTHOR + + Steve + -- + http://www.steve.org.uk/ + + $Id: xen-create-nfs,v 1.3 2007-03-19 21:42:31 steve Exp $ + +=cut + + +=head1 LICENSE + +Copyright (c) 2005-2007 by Steve Kemp. All rights reserved. + +This module is free software; +you can redistribute it and/or modify it under +the same terms as Perl itself. +The LICENSE file contains the full text of the license. + + +=cut + use strict; use English; @@ -201,13 +305,13 @@ sub parseCommandLineArguments if ( $VERSION ) { - my $REVISION = '$Revision: 1.2 $'; + my $REVISION = '$Revision: 1.3 $'; if ( $REVISION =~ /1.([0-9.]+) / ) { $REVISION = $1; } - logprint( "xen-create-image release $RELEASE - CVS: $REVISION\n" ); + logprint( "xen-create-nfs release $RELEASE - CVS: $REVISION\n" ); exit; } }