better test for needed binaries after start (pre-flight check)
authorHeiko Schlittermann (ZARAFA.ctq.de) hs@schlittermann.de
Thu, 28 Apr 2011 11:26:03 +0200
changeset 52 72c18cbde521
parent 51 3a24a6f14f09
child 53 1e29d8bd4ae2
better test for needed binaries after start (pre-flight check)
bin/ftbackup
--- a/bin/ftbackup	Thu Apr 28 00:26:56 2011 +0200
+++ b/bin/ftbackup	Thu Apr 28 11:26:03 2011 +0200
@@ -98,7 +98,9 @@
     my @errors = ();
     push @errors, "Need FTP_HOST (see config)." if not defined $cf{FTP_HOST};
     push @errors, "Need KEY (see config)."      if not defined $cf{KEY};
-    push @errors, "Command `dump' not found."   if system("command -v dump >/dev/null");
+    push @errors, "Command `dump' not found. ($ENV{PATH})"   if system("command -v dump >/dev/null");
+    push @errors, "Command `lvm' not found. ($ENV{PATH})"    if system("command -v lvm >/dev/null");
+    push @errors, "Command `fsck' not found. ($ENV{PATH})"   if system("command -v fsck >/dev/null");
     die "$ME: pre-flight check failed:\n\t", 
 	join("\n\t" => @errors), "\n" if @errors;