/[vz-tools]/trunk/lib/VZ.pm
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/lib/VZ.pm

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

revision 44 by dpavlin, Sat Feb 9 00:28:10 2008 UTC revision 46 by dpavlin, Sun Mar 30 12:48:18 2008 UTC
# Line 110  sub conf_veids { Line 110  sub conf_veids {
110  sub runscript {  sub runscript {
111          my ( $veid, $path ) = @_;          my ( $veid, $path ) = @_;
112    
113          open(my $fh, $path) || die "can't open $path: $!";          if ( open(my $fh, $path) ) {
114          while(<$fh>) {                  while(<$fh>) {
115                  chomp;                          chomp;
116                  next if (m/^\s*$/);                          next if (m/^\s*$/);
117                  if (/^#\s+(.+)$/) {                          if (/^#\s+(.+)$/) {
118                          warn ">> $1\n";                                  warn ">> $1\n";
119                  } else {                          } else {
120                          vzctl('exec', $veid, $_);                                  vzctl('exec', $veid, $_);
121                            }
122                  }                  }
123            } else {
124                    warn "can't open $path: $!";
125          }          }
126  }  }
127                                    

Legend:
Removed from v.44  
changed lines
  Added in v.46

  ViewVC Help
Powered by ViewVC 1.1.26