1 package FS::part_export::cardfortress;
4 use base 'FS::part_export';
6 use String::ShellQuote;
8 #tie my %options, 'Tie::IxHash';
13 'desc' => 'CardFortress',
14 'options' => {}, #\%options,
19 sub rebless { shift; }
22 my($self, $svc_acct) = (shift, shift);
24 eval "use Net::OpenSSH;";
27 open my $def_in, '<', '/dev/null' or die "unable to open /dev/null";
28 my $ssh = Net::OpenSSH->new( $self->machine,
29 default_stdin_fh => $def_in );
31 my $private_key = $ssh->capture(
32 { 'stdin_data' => $svc_acct->_password. "\n" },
33 '/usr/local/bin/merchant_create', map $svc_acct->$_, qw( username finger )
35 return $ssh->error if $ssh->error;
37 $svc_acct->cf_privatekey($private_key);
44 my( $self, $new, $old ) = (shift, shift, shift);
46 return 'username changes not yet supported'
47 if $old->username ne $new->username;
49 return 'password changes not yet supported'
50 if $old->_password ne $new->_password;
52 return 'Real name changes not yet supported'
53 if $old->finger ne $new->finger;
59 #my( $self, $svc_x ) = (shift, shift);
61 return 'deletion not yet supproted';