/[vz-tools]/trunk/vz-create.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/vz-create.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 17 by dpavlin, Mon Apr 16 20:37:13 2007 UTC revision 18 by dpavlin, Tue Apr 17 12:46:31 2007 UTC
# Line 10  use Regexp::Common qw/net/; Line 10  use Regexp::Common qw/net/;
10  # default debian distribution  # default debian distribution
11  my $dist = 'etch';  my $dist = 'etch';
12  # debian mirror to use  # debian mirror to use
13  my $debian_mirror_uri = 'http://debian.carnet.hr/debian';  my $debian_mirror_uri = 'http://www.debian.org/debian';
14  # split physicial machine in how meny virtual ones?  # split physicial machine in how meny virtual ones?
15  my $ve_total = 4;  my $ve_total = 4;
16  # swap size (Mb)  # swap size (Mb)
# Line 18  my $swap_size = 512; Line 18  my $swap_size = 512;
18  # diskspace  # diskspace
19  my $diskspace = '2G:4G';  my $diskspace = '2G:4G';
20    
21    my $config_file = $0;
22    $config_file =~ s!-create.pl!-tools.conf!;
23    warn "## $config_file\n";
24    if (-e $config_file) {
25            open(my $fh, '<', $config_file) || die "can't open $config_file: $!";
26            eval join("\n", <$fh>);
27            close($fh);
28            die "Error in $config_file: $@" if ($@);
29    }
30    
31  print "Creating new OpenVZ instance...\n";  print "Creating new OpenVZ instance...\n";
32    
33  my $arg = shift @ARGV || '';  my $arg = shift @ARGV || '';
# Line 56  warn ">> creating directories\n"; Line 66  warn ">> creating directories\n";
66    
67  mkdir('-p', "$vz_root/root/$ve_id", "$vz_root/private/$ve_id");  mkdir('-p', "$vz_root/root/$ve_id", "$vz_root/private/$ve_id");
68    
69  warn ">> installing debian\n";  warn ">> installing debian $dist from $debian_mirror_uri\n";
70    
71  if (! -e "$vz_root/private/$ve_id/etc/debian_version") {  if (! -e "$vz_root/private/$ve_id/etc/debian_version") {
72    

Legend:
Removed from v.17  
changed lines
  Added in v.18

  ViewVC Help
Powered by ViewVC 1.1.26