Skip to content

Commit

Permalink
Add check to make sure DHCP route error only shows for DHCP setups
Browse files Browse the repository at this point in the history
  • Loading branch information
tayterz2 committed Dec 30, 2024
1 parent 34d7000 commit 0541dc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/console/install_panels.go
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ func addNetworkPanel(c *Console) error {
if err != nil {
return fmt.Sprintf("Failed to check default route: %s.", err.Error()), nil
}
if !isDefaultRouteExist {
if !isDefaultRouteExist && mgmtNetwork.Method == config.NetworkMethodDHCP {
return ErrMsgNoDefaultRoute, nil
}

Expand Down Expand Up @@ -2404,7 +2404,7 @@ func addInstallPanel(c *Console) error {
printToPanel(c.Gui, "Failed to check default route.", installPanel)
return
}
if !installModeOnly && !isDefaultRouteExist {
if !installModeOnly && !isDefaultRouteExist && c.config.Install.ManagementInterface.Method == config.NetworkMethodDHCP {
logrus.Error(ErrMsgNoDefaultRoute)
printToPanel(c.Gui, ErrMsgNoDefaultRoute, installPanel)
return
Expand Down

0 comments on commit 0541dc8

Please sign in to comment.