--- trunk/vz-create.pl 2008/02/09 00:28:10 44 +++ trunk/vz-create.pl 2008/03/12 00:43:49 45 @@ -8,6 +8,7 @@ use Regexp::Common qw/net/; use lib 'lib'; use VZ; +use Getopt::Long; # default debian distribution my $dist = 'etch'; @@ -15,15 +16,22 @@ my $debian_mirror_uri = 'http://www.debian.org/debian'; my $arh = 'i386'; # split physicial machine in how meny virtual ones? -my $ve_total = 4; +my $split = 4; # swap size (Mb) my $swap_size = 512; # diskspace my $diskspace = '2G:4G'; -$dist = 'testing'; +$dist = 'lenny'; $arh = 'amd64'; +GetOptions( + 'dist=s' => \$dist, + 'arh=s' => \$arh, + 'mirror=s' => \$debian_mirror_uri, + 'split=i' => \$split, +); + check_root; my $config_file = $0; @@ -94,7 +102,7 @@ if (-e $conf_path) { warn "$conf_path allready exists, not touching it\n"; } else { - vzsplit('-n', $ve_total, '-s', $swap_size * 1024, '>', $conf_path); + vzsplit('-n', $split, '-s', $swap_size * 1024, '>', $conf_path); die "configuration file not created" unless -e $conf_path; @@ -139,4 +147,5 @@ vzctl('set', $ve_id, '--userpasswd', "$login:$passwd" ); } +runscript( $ve_id, 'custom/50-hypertable.sh' ); print "OK: $ve_id created\n";