Check if init module available before using

This commit is contained in:
Ilia
2022-06-14 01:24:39 +03:00
parent 6f61ab1373
commit ababa1ff72

View File

@@ -2401,7 +2401,8 @@ sub reload_miniserv
{
my ($ignore) = @_;
return undef if (&is_readonly_mode());
if (&has_command('systemctl')) {
if (&has_command('systemctl') &&
&foreign_available("init")) {
&foreign_require("init");
my $unit_target =
&get_product_name() eq 'usermin' ?