From 052106bc78ba7451e7f5ba19f28cec4b8482dd4b Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sun, 5 May 2024 14:47:48 +0200 Subject: [PATCH] filesystem-functions.pl: Add some defaults to volumes_status() function Defaults if not other specified to only collect data from mounted devices. Do not grab any uuid details from those volumes and also do not try to determine the disk usage. Signed-off-by: Stefan Schantl --- config/cfgroot/filesystem-functions.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/cfgroot/filesystem-functions.pl b/config/cfgroot/filesystem-functions.pl index 28c84fade..22f0902b5 100644 --- a/config/cfgroot/filesystem-functions.pl +++ b/config/cfgroot/filesystem-functions.pl @@ -67,6 +67,16 @@ sub volumes_status (%) { my (%options) = @_; my %volumes; + # Defaults. + my %defaults = ( + "devices" => "mounted", + "uuids" => "False", + "df" => "False" + ); + + # Merge and overwrite the defaults with the given options. + %options = (%defaults, %options); + # Grab all available devices if requested. if($options{'devices'} eq "all") { # Get all available devices. -- 2.39.5