initial commit of file from CVS for e-smith-base on Thu 26 Oct 11:24:52 BST 2023
This commit is contained in:
18
root/etc/e-smith/db/accounts/migrate/50VPNClientAccess
Normal file
18
root/etc/e-smith/db/accounts/migrate/50VPNClientAccess
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
# Migrate PPTPAccess -> VPNClientAccess and ensure a default for
|
||||
# all user/admin accounts
|
||||
|
||||
foreach my $account ($DB->get_all)
|
||||
{
|
||||
next unless ( ($account->key eq 'admin') or
|
||||
($account->prop('type') eq 'user') );
|
||||
|
||||
next if (defined $account->prop('VPNClientAccess'));
|
||||
|
||||
my $access = $account->prop('PPTPAccess') || 'no';
|
||||
|
||||
$account->delete_prop('PPTPAccess');
|
||||
|
||||
$account->set_prop('VPNClientAccess', $access);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user