mirror of
https://github.com/webmin/webmin.git
synced 2026-06-10 06:40:32 +01:00
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.
19 lines
393 B
Perl
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;
|