marsadm: improve reporting of setup problems

This commit is contained in:
Thomas Schoebel-Theuer 2022-03-13 20:17:31 +01:00 committed by Thomas Schoebel-Theuer
parent c2c5c49364
commit 2a73d99a68

View File

@ -11032,6 +11032,13 @@ sub do_all_res {
} }
if ($cmd =~ m/^(view|pretty)/) { if ($cmd =~ m/^(view|pretty)/) {
if (! -d $mars) {
lwarn "directory $mars does not exist - please read mars-user-manual.pdf\n";
} elsif (system("/usr/bin/mountpoint $mars >/dev/null")) {
lwarn "directory $mars is NOT a mountpoint - please mount it.\n";
} elsif (! -l "$mars/uuid") {
lwarn "no cluster uuid found -- be sure to FULLY UNDERSTAND what you need to do, by reading mars-user-manual.pdf\n";
}
lwarn "mars kernel module is not loaded\n" unless is_module_loaded(); lwarn "mars kernel module is not loaded\n" unless is_module_loaded();
if ($res eq "all" && $cmd =~ m/^view-?(.*)/) { if ($res eq "all" && $cmd =~ m/^view-?(.*)/) {
my $global_macro_name = $1 ? "$1-header" : "default-header"; my $global_macro_name = $1 ? "$1-header" : "default-header";