/[vz-tools]/trunk/vz-remove.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-remove.pl

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

revision 36 by dpavlin, Fri Feb 8 20:03:16 2008 UTC revision 37 by dpavlin, Fri Feb 8 21:43:29 2008 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3  use strict;  use strict;
4  use Shell qw/rm vzlist/;  use Shell qw/rm vzlist vzctl/;
5    
6  my $vz   = '/vz';  my $vz   = '/vz';
7  my $conf = '/etc/vz/conf';  my $conf = '/etc/vz/conf';
# Line 30  die "Usage: $0 VEID\n\n", join("\n",vzli Line 30  die "Usage: $0 VEID\n\n", join("\n",vzli
30    
31  my $c = "$conf/$VEID.conf";  my $c = "$conf/$VEID.conf";
32  if ( -e $c ) {  if ( -e $c ) {
33            vzctl('stop', $VEID);
34          unlink $c || die "can't remove $c: $!";          unlink $c || die "can't remove $c: $!";
35  } else {  } else {
36          warn "WARNING: configuration file $c doesn't exist\n";          warn "WARNING: configuration file $c doesn't exist\n";

Legend:
Removed from v.36  
changed lines
  Added in v.37

  ViewVC Help
Powered by ViewVC 1.1.26