X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export.pm;h=7661d7e10907c61743b9c9f53cea0654d3bc75bc;hb=0ff28424ec1178ba6369d643d3b5f43d51a17514;hp=14e4676e90accee12a1f9f5dd37790d4dabbc928;hpb=bbbdd40d71fa66405224872a173a080a7a7dbfef;p=freeside.git
diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm
index 14e4676e9..7661d7e10 100644
--- a/FS/FS/part_export.pm
+++ b/FS/FS/part_export.pm
@@ -370,8 +370,8 @@ sub rebless {
my $self = shift;
my $exporttype = $self->exporttype;
my $class = ref($self). "::$exporttype";
-# eval "use $class;" or die $@;
eval "use $class;";
+ die $@ if $@;
bless($self, $class);
}
@@ -414,6 +414,26 @@ sub export_delete {
$self->_export_delete(@_);
}
+=item export_suspend
+
+=cut
+
+sub export_suspend {
+ my $self = shift;
+ $self->rebless;
+ $self->_export_suspend(@_);
+}
+
+=item export_unsuspend
+
+=cut
+
+sub export_unsuspend {
+ my $self = shift;
+ $self->rebless;
+ $self->_export_unsuspend(@_);
+}
+
#fallbacks providing useful error messages intead of infinite loops
sub _export_insert {
my $self = shift;
@@ -430,6 +450,20 @@ sub _export_delete {
return "_export_delete: unknown export type ". $self->exporttype;
}
+#fallbacks providing null operations
+
+sub _export_suspend {
+ my $self = shift;
+ #warn "warning: _export_suspened unimplemented for". ref($self);
+ '';
+}
+
+sub _export_unsuspend {
+ my $self = shift;
+ #warn "warning: _export_unsuspend unimplemented for ". ref($self);
+ '';
+}
+
=back
=head1 SUBROUTINES
@@ -480,6 +514,20 @@ sub exporttype2svcdb {
'';
}
+tie my %sysvshell_options, 'Tie::IxHash',
+ 'crypt' => { label=>'Password encryption',
+ type=>'select', options=>[qw(crypt md5)],
+ default=>'crypt',
+ },
+;
+
+tie my %bsdshell_options, 'Tie::IxHash',
+ 'crypt' => { label=>'Password encryption',
+ type=>'select', options=>[qw(crypt md5)],
+ default=>'crypt',
+ },
+;
+
tie my %shellcommands_options, 'Tie::IxHash',
#'machine' => { label=>'Remote machine' },
'user' => { label=>'Remote username', default=>'root' },
@@ -565,12 +613,16 @@ tie my %sqlmail_options, 'Tie::IxHash',
'sysvshell' => {
'desc' =>
'Batch export of /etc/passwd and /etc/shadow files (Linux/SysV)',
- 'options' => {},
+ 'options' => \%sysvshell_options,
+ 'nodomain' => 'Y',
+ 'notes' => 'MD5 crypt requires installation of Crypt::PasswdMD5 from CPAN.',
},
'bsdshell' => {
'desc' =>
'Batch export of /etc/passwd and /etc/master.passwd files (BSD)',
- 'options' => {},
+ 'options' => \%bsdshell_options,
+ 'nodomain' => 'Y',
+ 'notes' => 'MD5 crypt requires installation of Crypt::PasswdMD5 from CPAN.',
},
# 'nis' => {
# 'desc' =>
@@ -580,6 +632,7 @@ tie my %sqlmail_options, 'Tie::IxHash',
'textradius' => {
'desc' => 'Batch export of a text /etc/raddb/users file (Livingston, Cistron)',
'options' => {},
+ 'notes' => 'unfinished...',
},
'shellcommands' => {
@@ -600,8 +653,7 @@ tie my %sqlmail_options, 'Tie::IxHash',
'desc' => 'Real-time export to SQL-backed mail server',
'options' => \%sqlmail_options,
'nodomain' => 'Y',
- 'notes' => 'Database schema can be made to work with Courier IMAP and
- Exim. Others could work but are untested.',
+ 'notes' => 'Database schema can be made to work with Courier IMAP and Exim. Others could work but are untested.',
},
'cyrus' => {