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
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl -w
# (c) 2010 Thomas Schoebel-Theuer / 1&1 Internet AG
# Time-stamp: <11/10/18 11:13:04 schoebel>
# $Id$
use strict;
use English;
@ -222,7 +222,7 @@ sub create_cluster {
sub join_cluster {
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/);
}
print "joining cluster via rsync (peer='$peer')\n";