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 <