20 lines
687 B
Plaintext
20 lines
687 B
Plaintext
|
{
|
||
|
my $AccessType = $DB->get('AccessType');
|
||
|
my $DialupUserAccount = $DB->get('DialupUserAccount');
|
||
|
my $SystemName = $DB->get('SystemName');
|
||
|
return unless ($AccessType && $DialupUserAccount && $SystemName);
|
||
|
|
||
|
if ($AccessType->value eq 'dedicated'
|
||
|
&& $DialupUserAccount->value eq 'useraccount'
|
||
|
&& $SystemName->value ne 'e-smith')
|
||
|
{
|
||
|
# Heuristic to migrate DHCP client identifier - we used to use SystemName
|
||
|
# and now we use DialupUserAccount
|
||
|
# So we migrate SystemName to DialupUserAccount, unless DialupUserAccount
|
||
|
# is already set, or the SystemName appears not set (default setting)
|
||
|
$DialupUserAccount->merge_props(type => $SystemName->value);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|