mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
FRITZBOX: password by rename
git-svn-id: https://svn.fhem.de/fhem/trunk@15456 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ef7389138f
commit
d0b926371a
@ -175,6 +175,7 @@ sub FRITZBOX_Initialize($)
|
||||
$hash->{DefFn} = "FRITZBOX_Define";
|
||||
$hash->{UndefFn} = "FRITZBOX_Undefine";
|
||||
$hash->{DeleteFn} = "FRITZBOX_Delete";
|
||||
$hash->{RenameFn} = "FRITZBOX_Rename";
|
||||
|
||||
$hash->{SetFn} = "FRITZBOX_Set";
|
||||
$hash->{GetFn} = "FRITZBOX_Get";
|
||||
@ -285,6 +286,20 @@ sub FRITZBOX_Delete ($$)
|
||||
return undef;
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
sub FRITZBOX_Rename($$)
|
||||
{
|
||||
my ($new, $old) = @_;
|
||||
|
||||
my $old_index = "FRITZBOX_".$old."_passwd";
|
||||
my $new_index = "FRITZBOX_".$new."_passwd";
|
||||
|
||||
my ($err, $old_pwd) = getKeyValue($old_index);
|
||||
|
||||
setKeyValue($new_index, $old_pwd);
|
||||
setKeyValue($old_index, undef);
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
sub FRITZBOX_Attr($@)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user