Get config panel working for nutups
This commit is contained in:
@@ -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;
|
Reference in New Issue
Block a user