mirror of https://github.com/schoebel/mars
marsadm: check for matching version numbers
This commit is contained in:
parent
67b322d600
commit
9187bf210d
|
@ -39,9 +39,10 @@ sub lwarn {
|
|||
|
||||
##################################################################
|
||||
|
||||
# global variables
|
||||
# global variables and checks
|
||||
|
||||
my $Id = '$Id$';
|
||||
my $Id = '$Id$ ';
|
||||
my $user_version = 0.1;
|
||||
my $mars = "/mars";
|
||||
my $host = `uname -n` or ldie "cannot determine my network node name\n";
|
||||
chomp $host;
|
||||
|
@ -49,6 +50,16 @@ my $force = 0;
|
|||
my $timeout = -1;
|
||||
my $ip = _get_ip() or ldie "cannot determine my IP address\n";
|
||||
|
||||
if (! -d $mars) {
|
||||
ldie "The $mars directory does not exist.\n";
|
||||
}
|
||||
if (! $1 =~ /cluster/) {
|
||||
my $kernel_version = readlink("$mars/tree-$host");
|
||||
if ($kernel_version && $user_version < $kernel_version) {
|
||||
ldie "Sorry, your MARS kernel module uses version $kernel_version, but my $0 userspace version is only $user_version. That cannot work. Please upgrade your userspace scripts!\n";
|
||||
}
|
||||
}
|
||||
|
||||
##################################################################
|
||||
|
||||
# timeout handling
|
||||
|
|
Loading…
Reference in New Issue