make all configuration specific values editable
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 12:25:41 +0000 (12:25 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 12:25:41 +0000 (12:25 +0000)
all values which begin with configuraiton name
will be editable

lib/PXElator/httpd.pm

index 3218391..675e428 100644 (file)
@@ -362,13 +362,12 @@ warn "XXX pids = ", dump( $daemons::pids );
 
                if ( $ip && $ip ne $server::ip ) {
 
-                       my @editable = ( qw/hostname config homepage/ );
-
-                       client::conf( $ip, $_ => $param->{$_} ) foreach @editable;
-
                        my $conf = client::all_conf( $ip );
                        my $config = delete $conf->{config};
 
+                       my @editable = ( qw/hostname config homepage/, grep { m{^\Q$config\E} } keys %$conf );
+                       client::conf( $ip, $_ => $param->{$_} ) foreach @editable;
+
                        my $nmap = qq|<a href=/nmap?scan=$ip>nmap</a>|;
                        my @table = (
                                'ping' => ping::host($ip)