From dd478fe88913ec239beb5c8d118f4e99472b6b2e Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Thu, 21 May 2026 18:27:11 +0200 Subject: [PATCH] Back to smart wouthout debug --- smart.cmake | 58 +++-------------------------------------------------- 1 file changed, 3 insertions(+), 55 deletions(-) diff --git a/smart.cmake b/smart.cmake index 8ee6ce4..8846ffe 100644 --- a/smart.cmake +++ b/smart.cmake @@ -115,63 +115,11 @@ if( ( $c[0] eq 'service' && $c[1] eq 'control' ) || { # Service control must run before drop_root(). # /service/control is the preferred path; /cgi-bin/control is kept as a legacy alias. - my @control_paths = (); - - if( defined( $smart_control_path ) && $smart_control_path ne '' && - $smart_control_path !~ /^\@.*\@/ ) + my $rv = do( $smart_control_path ); + if( ! defined $rv ) { - push( @control_paths, $smart_control_path ); + error( 500 ); } - - push( @control_paths, $smart_libexec_dir . '/control' ); - - my %seen_control_path = (); - my $control_loaded = 0; - my $control_error = ''; - - foreach my $control_path ( @control_paths ) - { - next if $seen_control_path{$control_path}++; - next if $control_path eq ''; - - if( ! -r $control_path ) - { - $control_error .= "Cannot read control helper: $control_path: $!\n"; - next; - } - - my $rv = do( $control_path ); - if( defined( $rv ) ) - { - $control_loaded = 1; - last; - } - - if( $@ ne '' ) - { - $control_error .= "Could not compile control helper $control_path: $@\n"; - } - else - { - $control_error .= "Could not load control helper $control_path: $!\n"; - } - } - - if( ! $control_loaded ) - { - $control_error = 'Unknown control helper loading error.' if $control_error eq ''; - print <