@@ -347,10 +347,19 @@ func startup(ctx context.Context, s *state.State, t *tui.TUI) error { //nolint:r
347347 return err
348348 }
349349
350+ // Sometimes the system may not be able to immediately check the provider for any updates.
351+ // One such example is when Operations Center is installed and the underlying IncusOS system
352+ // is registered to it as the provider. We need to wait until the Operations Center
353+ // application has started, otherwise any update check will fail.
354+ delayInitialUpdateCheck , err := checkDelayInitialUpdate (ctx , s )
355+ if err != nil {
356+ return err
357+ }
358+
350359 // Perform network configuration.
351360 slog .InfoContext (ctx , "Bringing up the network" )
352361
353- err = systemd .ApplyNetworkConfiguration (ctx , s , s .System .Network .Config , 30 * time .Second , s .OS .SuccessfulBoot , providers .Refresh )
362+ err = systemd .ApplyNetworkConfiguration (ctx , s , s .System .Network .Config , 30 * time .Second , s .OS .SuccessfulBoot , providers .Refresh , delayInitialUpdateCheck )
354363 if err != nil {
355364 return err
356365 }
@@ -395,15 +404,6 @@ func startup(ctx context.Context, s *state.State, t *tui.TUI) error { //nolint:r
395404 return err
396405 }
397406
398- // Sometimes the system may not be able to immediately check the provider for any updates.
399- // One such example is when Operations Center is installed and the underlying IncusOS system
400- // is registered to it as the provider. We need to wait until the Operations Center
401- // application has started, otherwise any update check will fail.
402- delayInitialUpdateCheck , err := checkDelayInitialUpdate (ctx , s )
403- if err != nil {
404- return err
405- }
406-
407407 if ! delayInitialUpdateCheck {
408408 // Perform an initial blocking check for updates before proceeding.
409409 updateChecker (ctx , s , t , p , true , false )
0 commit comments