From 87e22680728124c7d339a32d99f61442ccc204d7 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 30 Jun 2002 02:13:33 +0000 Subject: [PATCH] export! --- FS/FS/part_export.pm | 15 ++++++++++----- FS/FS/part_export/shellcommands_withdomain.pm | 7 +++++++ FS/MANIFEST | 12 ++++++++++++ FS/t/part_export-shellcommands_withdomain.t | 5 +++++ 4 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 FS/FS/part_export/shellcommands_withdomain.pm create mode 100644 FS/t/part_export-shellcommands_withdomain.t diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index 74f7006ca..23f948f6a 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -581,6 +581,11 @@ tie my %shellcommands_withdomain_options, 'Tie::IxHash', }, ; +tie my %textradius_options, 'Tie::IxHash', + 'user' => { label=>'Remote username', default=>'root' }, + 'users' => { label=>'users file location', default=>'/etc/raddb/users' }, +; + tie my %sqlradius_options, 'Tie::IxHash', 'datasrc' => { label=>'DBI data source ' }, 'username' => { label=>'Database username' }, @@ -661,22 +666,22 @@ tie my %sqlmail_options, 'Tie::IxHash', # 'options' => {}, # }, 'textradius' => { - 'desc' => 'Batch export of a text /etc/raddb/users file (Livingston, Cistron)', - 'options' => {}, - 'notes' => 'unfinished', + 'desc' => 'Real-time export to a text /etc/raddb/users file (Livingston, Cistron)', + 'options' => \%textradius_options, + 'notes' => 'This will edit a text RADIUS users file in place on a remote server. Requires installation of RADIUS::UserFile from CPAN. If using RADIUS::UserFile 1.01, make sure to apply this patch. Also make sure rsync is installed on the remote machine, and SSH is setup for unattended operation.', }, 'shellcommands' => { 'desc' => 'Real-time export via remote SSH (i.e. useradd, userdel, etc.)', 'options' => \%shellcommands_options, 'nodomain' => 'Y', - 'notes' => 'Run remote commands via SSH. Usernames are considered unique (also see shellcommands_withdomain).', + 'notes' => 'Run remote commands via SSH. Usernames are considered unique (also see shellcommands_withdomain). You probably want this if the commands you are running will not accept a domain as a parameter. You will need to setup SSH for unattended operation.', }, 'shellcommands_withdomain' => { 'desc' => 'Real-time export via remote SSH.', 'options' => \%shellcommands_withdomain_options, - 'notes' => 'Run remote commands via SSH. username@domain (rather than just usernames) are considered unique (also see shellcommands)', + 'notes' => 'Run remote commands via SSH. username@domain (rather than just usernames) are considered unique (also see shellcommands). You probably want this if the commands you are running will accept a domain as a parameter, and will allow the same username with different domains. You will need to setup SSH for unattended operation.', }, 'sqlradius' => { diff --git a/FS/FS/part_export/shellcommands_withdomain.pm b/FS/FS/part_export/shellcommands_withdomain.pm new file mode 100644 index 000000000..a15c24d88 --- /dev/null +++ b/FS/FS/part_export/shellcommands_withdomain.pm @@ -0,0 +1,7 @@ +package FS::part_export::shellcommands_withdomain; + +use vars qw(@ISA); +use FS::part_export::shellcommands; + +@ISA = qw(FS::part_export::shellcommands); + diff --git a/FS/MANIFEST b/FS/MANIFEST index daf27b7e4..c932f3aa0 100644 --- a/FS/MANIFEST +++ b/FS/MANIFEST @@ -49,15 +49,21 @@ FS/part_bill_event.pm FS/export_svc.pm FS/part_export.pm FS/part_export_option.pm +FS/part_export/bind.pm +FS/part_export/bind_slave.pm FS/part_export/bsdshell.pm FS/part_export/cp.pm FS/part_export/cyrus.pm FS/part_export/infostreet.pm +FS/part_export/null.pm FS/part_export/shellcommands.pm +FS/part_export/shellcommands_withdomain.pm FS/part_export/sqlmail.pm FS/part_export/sqlradius.pm +FS/part_export/sysvshell.pm FS/part_export/textradius.pm FS/part_export/vpopmail.pm +FS/part_export/www_shellcommands.pm FS/part_pkg.pm FS/part_pop_local.pm FS/part_referral.pm @@ -113,15 +119,21 @@ t/part_bill_event.t t/export_svc.t t/part_export.t t/part_export_option.t +t/part_export-bind.t +t/part_export-bind_slave.t t/part_export-bsdshell.t t/part_export-cp.t t/part_export-cyrus.t t/part_export-infostreet.t +t/part_export-null.t t/part_export-shellcommands.t +t/part_export-shellcommands_withdomain.t t/part_export-sqlmail.t t/part_export-sqlradius.t +t/part_export-sysvshell.t t/part_export-textradius.t t/part_export-vpopmail.t +t/part_export-www_shellcommands.t t/part_pkg.t t/part_pop_local.t t/part_referral.t diff --git a/FS/t/part_export-shellcommands_withdomain.t b/FS/t/part_export-shellcommands_withdomain.t new file mode 100644 index 000000000..c0bd1bbb0 --- /dev/null +++ b/FS/t/part_export-shellcommands_withdomain.t @@ -0,0 +1,5 @@ +BEGIN { $| = 1; print "1..1\n" } +END {print "not ok 1\n" unless $loaded;} +use FS::part_export::shellcommands_withdomain; +$loaded=1; +print "ok 1\n"; -- 2.11.0