/[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 47 by dpavlin, Sun Mar 30 12:48:39 2008 UTC revision 63 by dpavlin, Fri Feb 27 18:38:19 2009 UTC
# Line 75  my @ip_split = split(/\./,$ip); Line 75  my @ip_split = split(/\./,$ip);
75    
76  my $ve_id = sprintf('%d%03d', $ip_split[2], $ip_split[3]);  my $ve_id = sprintf('%d%03d', $ip_split[2], $ip_split[3]);
77    
78    if ( $ve_id < 101 ) {
79            $ve_id += 100;
80            warn "# VEID moved to $ve_id because 0 .. 100 are reserved\n";
81    }
82    
83  print "VEID: $ve_id hostname: $hostname ip: $ip\n";  print "VEID: $ve_id hostname: $hostname ip: $ip\n";
84    
85  warn ">> creating directories\n";  warn ">> creating directories\n";
# Line 144  if ($login) { Line 149  if ($login) {
149          vzctl('set', $ve_id, '--userpasswd', "$login:$passwd" );          vzctl('set', $ve_id, '--userpasswd', "$login:$passwd" );
150  }  }
151    
152  runscript( $ve_id, 'custom/50-hypertable.sh' );  #runscript( $ve_id, 'custom/50-hypertable.sh' );
153  print "OK: $ve_id created\n";  print "OK: $ve_id created\n";

Legend:
Removed from v.47  
changed lines
  Added in v.63

  ViewVC Help
Powered by ViewVC 1.1.26