mirror of
https://github.com/schoebel/mars
synced 2025-01-06 22:35:47 +00:00
fix possible hole in join_cluster checking, add $Id$ to marsadm
This commit is contained in:
parent
713dd11960
commit
2793ec2148
@ -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";
|
||||||
|
Loading…
Reference in New Issue
Block a user