Don't send time command when quitting
authorJamie Cameron <jcameron@webmin.com>
Mon, 10 Aug 2009 00:50:04 +0000 (17:50 -0700)
committerJamie Cameron <jcameron@webmin.com>
Mon, 10 Aug 2009 00:50:04 +0000 (17:50 -0700)
bacula-backup/bacula-backup-lib.pl

index 217e131..e5fee73 100755 (executable)
@@ -734,7 +734,9 @@ sub console_cmd
 {
 local ($h, $cmd) = @_;
 &sysprint($h->{'infh'}, $cmd."\n");
-&sysprint($h->{'infh'}, "time\n");
+if ($cmd ne "quit") {
+       &sysprint($h->{'infh'}, "time\n");
+       }
 local $rv = &wait_for($h->{'outfh'}, 'time\n(\d+\-\S+\-\d+ \d+:\d+:\d+)\n',
                                     'Unable to connect to Director');
 return undef if ($rv == 1);