From a700941d06ea323daf775b7bf47e7c2fad1df948 Mon Sep 17 00:00:00 2001 From: steve Date: Thu, 22 Feb 2007 19:39:04 +0000 Subject: [PATCH] 2007-02-22 19:39:02 by steve Added new command line flag --admins, which allows new users to be setup upon the host system with the xen-shell. --- bin/xen-create-image | 41 +++++++++++++++++++-- bin/xt-create-xen-config | 78 +++++++++++++++++++++++++++++++++++++--- etc/xm.tmpl | 6 ++++ 3 files changed, 118 insertions(+), 7 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 50eb4a7..8c16aeb 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -25,6 +25,9 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH. --accounts Copy all non-system accounts to the guest image + --admins Specify that some administrators should be created for + this image, using xen-shell. + --boot Boot the new instance after creating it. --cache Cache .deb files on the host when installing the new guest @@ -517,7 +520,7 @@ Install an X11 server, using VNC and XDM -- http://www.steve.org.uk/ - $Id: xen-create-image,v 1.124 2007-02-22 19:15:25 steve Exp $ + $Id: xen-create-image,v 1.125 2007-02-22 19:39:02 steve Exp $ =cut @@ -865,6 +868,28 @@ E_O_ERROR } + # + # Make sure that xen-shell is installed if we've got an --admin + # flag specified + # + if ( $CONFIG{'admins'} ) + { + my $shell = undef; + $shell = "/usr/bin/xen-login-shell" if ( -x "/usr/bin/xen-login-shell" ); + $shell = "/usr/local/bin/xen-login-shell" if ( -x "/usr/bin/local/xen-login-shell" ); + + if ( !defined( $shell ) ) + { + print <