+if ($exportnum) {
+ my $export = qsearchs('part_export', { 'exportnum' => $exportnum });
+ die "Export not found" unless $export;
+ $host = $export->machine;
+ $port = $export->option('port');
+ $username = $export->option('username');
+ $password = $export->option('password');
+ die "Auth info not fully specified in export"
+ unless $host && $port && $username && $password;
+}
+
+die usage() unless $host && $password && $username;
+