mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 12:15:52 +02:00
extrahd.cgi: Add is_configured function.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
d0a6f9bdb2
commit
0aa77c2fd5
@@ -690,3 +690,15 @@ sub is_swap ($) {
|
||||
|
||||
return 1 if(grep /$device/, @swaps);
|
||||
}
|
||||
|
||||
#
|
||||
## Returns "True" if a drive is a configured one.
|
||||
#
|
||||
sub is_configured ($) {
|
||||
my ($path) = @_;
|
||||
|
||||
# Loop through the hash of configured drives.
|
||||
foreach my $uuid (keys %configured_drives) {
|
||||
return 1 if($configured_drives{$uuid} eq "$path");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user