e-smith-base/root/etc/e-smith/db/configuration/migrate/20DHCPClientIdentifier

20 lines
687 B
Plaintext
Raw Normal View History

{
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);
}
}