2007-02-22 19:42:49 by steve
Correctly make --admins=foo,bar,baz work.
This commit is contained in:
parent
a700941d06
commit
0b83bf0a5f
@ -103,7 +103,7 @@ xt-create-config - Create a Xen configuration file for a new guest
|
||||
--
|
||||
http://www.steve.org.uk/
|
||||
|
||||
$Id: xt-create-xen-config,v 1.31 2007-02-22 19:39:03 steve Exp $
|
||||
$Id: xt-create-xen-config,v 1.32 2007-02-22 19:42:49 steve Exp $
|
||||
|
||||
=cut
|
||||
|
||||
@ -170,7 +170,7 @@ createXenConfig();
|
||||
#
|
||||
# If we've been given any administrators then set them up.
|
||||
#
|
||||
if ( $CONFIG{'admins'} )
|
||||
if ( $ENV{'admins'} )
|
||||
{
|
||||
setupAdminUsers();
|
||||
}
|
||||
@ -207,7 +207,7 @@ sub parseCommandLineArguments
|
||||
# Parse options.
|
||||
#
|
||||
GetOptions(
|
||||
"admins=s", \$CONFIG{'admins'},
|
||||
"admins=s", \$ENV{'admins'},
|
||||
"output=s", \$CONFIG{'output'},
|
||||
"template=s", \$CONFIG{'template'},
|
||||
"verbose", \$CONFIG{'verbose'},
|
||||
@ -222,7 +222,7 @@ sub parseCommandLineArguments
|
||||
|
||||
if ( $VERSION )
|
||||
{
|
||||
my $REVISION = '$Revision: 1.31 $';
|
||||
my $REVISION = '$Revision: 1.32 $';
|
||||
if ( $REVISION =~ /1.([0-9.]+) / )
|
||||
{
|
||||
$REVISION = $1;
|
||||
@ -435,7 +435,7 @@ sub setupAdminUsers
|
||||
# For each user make sure they exist, and setup the
|
||||
# login shell for them.
|
||||
#
|
||||
foreach my $user ( split( /,/, $CONFIG{'admins'} ) )
|
||||
foreach my $user ( split( /,/, $ENV{'admins'} ) )
|
||||
{
|
||||
# Strip leading and trailing whitespace.
|
||||
$user =~ s/^\s+//;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user