Files
webmin/grub2/install_check.pl
Ilia Ross 523d68c67a Add GRUB 2 boot loader module
Adds a Webmin GRUB 2 module for inspecting boot entries, editing defaults, custom entries, themes, password protection, BLS-aware kernel options, safe menu regeneration, boot loader installation, manual config editing, status reporting, ACLs, backups, logging, and tests.
2026-05-28 02:20:53 +02:00

19 lines
393 B
Perl

# install_check.pl
use strict;
use warnings;
do 'grub2-lib.pl';
# is_installed(mode)
# For mode 1, returns 2 if GRUB 2 is installed and configured for Webmin,
# 1 if installed but not configured, or 0 otherwise.
# For mode 0, returns 1 if installed, 0 if not.
sub is_installed
{
my ($mode) = @_;
return 0 if (!&grub2_any_installed());
return $mode ? (&grub2_configured() ? 2 : 1) : 1;
}
1;