fix possible hole in join_cluster checking, add $Id$ to marsadm

This commit is contained in:
Thomas Schoebel-Theuer 2011-10-18 12:40:45 +02:00 committed by Thomas Schoebel-Theuer
parent 713dd11960
commit 2793ec2148

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl -w #!/usr/bin/perl -w
# (c) 2010 Thomas Schoebel-Theuer / 1&1 Internet AG # (c) 2010 Thomas Schoebel-Theuer / 1&1 Internet AG
# Time-stamp: <11/10/18 11:13:04 schoebel> # $Id$
use strict; use strict;
use English; use English;
@ -222,7 +222,7 @@ sub create_cluster {
sub join_cluster { sub join_cluster {
my ($cmd, $peer, $force) = @_; my ($cmd, $peer, $force) = @_;
if(glob("$mars/resource-*")) { if(glob("$mars/resource-*") or glob("$mars/ips/*") {
die "Sorry, some resources already exist!\nThis is dangerous!\nIf you are sure that no resource clash is possible, re-invoke this command with '--force' option\n" unless ($force and $force =~ m/--force/); die "Sorry, some resources already exist!\nThis is dangerous!\nIf you are sure that no resource clash is possible, re-invoke this command with '--force' option\n" unless ($force and $force =~ m/--force/);
} }
print "joining cluster via rsync (peer='$peer')\n"; print "joining cluster via rsync (peer='$peer')\n";