Skip to content

Commit

Permalink
Do not add HTTPClient entries if netboot is disabled. Issue #12892
Browse files Browse the repository at this point in the history
  • Loading branch information
vktg committed Mar 10, 2022
1 parent c07c5cf commit b68d8fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/etc/inc/services.inc
Expand Up @@ -561,7 +561,7 @@ function services_dhcpdv4_configure() {
$idx++;
}
}
if (!empty($dhcpifconf['uefihttpboot']) && !$httpclient) {
if (!empty($dhcpifconf['uefihttpboot']) && isset($dhcpifconf['netboot']) && !$httpclient) {
$custoptions .= "option custom-{$dhcpif}-{$idx} code 60 = text;\n";
}
if (is_array($dhcpifconf['pool'])) {
Expand All @@ -584,7 +584,7 @@ function services_dhcpdv4_configure() {
$idx++;
}
}
if (!empty($poolconf['uefihttpboot']) && !$httpclient) {
if (!empty($poolconf['uefihttpboot']) && isset($poolconf['netboot']) && !$httpclient) {
$custoptions .= "option custom-{$dhcpif}-{$poolidx}-{$idx} code 60 = text;\n";
}
}
Expand All @@ -610,7 +610,7 @@ function services_dhcpdv4_configure() {
}
$idx++;
}
if (!empty($sm['uefihttpboot']) && !$httpclient) {
if (!empty($sm['uefihttpboot']) && isset($sm['netboot']) && !$httpclient) {
$custoptions .= "option custom-s_{$dhcpif}_{$i}-{$idx} code 60 = text;\n";
}
$i++;
Expand Down Expand Up @@ -1041,7 +1041,7 @@ EOPP;
$idx++;
}
}
if (!empty($poolconf['uefihttpboot']) && !$httpclient &&
if (!empty($poolconf['uefihttpboot']) && isset($poolconf['netboot']) && !$httpclient &&
(!isset($dhcpifconf['uefihttpboot']) ||
($poolconf['uefihttpboot'] != $dhcpifconf['uefihttpboot']))) {
$dhcpdconf .= " option custom-{$dhcpif}-{$poolidx}-{$idx} \"HTTPClient\";\n";
Expand Down Expand Up @@ -1197,7 +1197,7 @@ EOD;
$idx++;
}
}
if (!empty($dhcpifconf['uefihttpboot']) && !$httpclient) {
if (!empty($dhcpifconf['uefihttpboot']) && isset($dhcpifconf['netboot']) && !$httpclient) {
$dhcpdconf .= " option custom-{$dhcpif}-{$idx} \"HTTPClient\";\n";
}

Expand Down Expand Up @@ -1381,7 +1381,7 @@ EOD;
}
$idx++;
}
if (!empty($poolconf['uefihttpboot']) && !$httpclient) {
if (!empty($poolconf['uefihttpboot']) && isset($poolconf['netboot']) && !$httpclient) {
$dhcpdconf .= " option custom-s_{$dhcpif}_{$i}-{$idx} \"HTTPClient\";\n";
}

Expand Down

0 comments on commit b68d8fe

Please sign in to comment.