365 |
my $conf = client::all_conf( $ip ); |
my $conf = client::all_conf( $ip ); |
366 |
my $config = delete $conf->{config}; |
my $config = delete $conf->{config}; |
367 |
|
|
368 |
my @editable = ( qw/hostname config homepage/, grep { m{^\Q$config\E} } keys %$conf ); |
my @editable = ( qw/hostname config homepage/ ); |
369 |
|
# add params with config prefix if config exists |
370 |
|
push @editable, grep { m{^\Q$config\E} } keys %$conf if $config; |
371 |
my @update = grep { defined $param->{$_} } @editable; |
my @update = grep { defined $param->{$_} } @editable; |
372 |
if ( @update ) { |
if ( @update ) { |
373 |
client::conf( $ip, $_ => $param->{$_} ) foreach @update; |
client::conf( $ip, $_ => $param->{$_} ) foreach @update; |