Get config panel working for nutups

This commit is contained in:
2025-01-20 18:06:41 +00:00
parent 51a59b9696
commit e717237726
3 changed files with 39 additions and 16 deletions

View File

@@ -180,8 +180,22 @@ sub create_link{
return $link;
}
sub get_model_options{
return [];
}
sub get_model_options {
# Execute the RPM command and capture the output
my @output = qx{rpm -ql nut | grep /usr/sbin};
# Check for errors
if ($? != 0) {
warn "Error executing command: $!";
return ['Error occurred'];
}
# Remove "/usr/sbin" from the front of each line
s{^/usr/sbin}{} for @output;
# Trim whitespace from each element and return the array
chomp(@output); # Remove newline characters from each line
return ["fred","Art"] #@output; # Return the array of modified output lines
}
1;