From d927a8b53105cb9b715f6d6f430e3bfee3fcfd95 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 20 Oct 2002 08:27:52 +0000 Subject: [PATCH] enable shellcommands suspension/unsuspension hooks --- FS/FS/part_export.pm | 24 ++++++++++++++++++++++++ FS/FS/part_export/shellcommands.pm | 10 ++++++++++ 2 files changed, 34 insertions(+) diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index c9ae41fc1..5d725ab22 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -552,6 +552,18 @@ tie my %shellcommands_options, 'Tie::IxHash', type =>'textarea', default=>'', }, + 'suspend' => { label=>'Suspension command', + default=>'', + }, + 'suspend_stdin' => { label=>'Suspension command STDIN', + default=>'', + }, + 'unsuspend' => { label=>'Unsuspension command', + default=>'', + }, + 'unsuspend_stdin' => { label=>'Unsuspension command STDIN', + default=>'', + }, ; tie my %shellcommands_withdomain_options, 'Tie::IxHash', @@ -577,6 +589,18 @@ tie my %shellcommands_withdomain_options, 'Tie::IxHash', type =>'textarea', #default=>"$_password\n$_password\n", }, + 'suspend' => { label=>'Suspension command', + default=>'', + }, + 'suspend_stdin' => { label=>'Suspension command STDIN', + default=>'', + }, + 'unsuspend' => { label=>'Unsuspension command', + default=>'', + }, + 'unsuspend_stdin' => { label=>'Unsuspension command STDIN', + default=>'', + }, ; tie my %www_shellcommands_options, 'Tie::IxHash', diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm index a514f9375..da6f4c46c 100644 --- a/FS/FS/part_export/shellcommands.pm +++ b/FS/FS/part_export/shellcommands.pm @@ -20,6 +20,16 @@ sub _export_delete { $self->_export_command('userdel', @_); } +sub _export_suspend { + my($self) = shift; + $self->_export_command('suspend', @_); +} + +sub _export_unsuspend { + my($self) = shift; + $self->_export_command('unsuspend', @_); +} + sub _export_command { my ( $self, $action, $svc_acct) = (shift, shift, shift); my $command = $self->option($action); -- 2.11.0