File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed
Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,15 @@ let update_pif_address ~__context ~self =
180180 with _ ->
181181 debug " Bridge %s is not up; not updating IP" bridge
182182
183+ let update_getty () =
184+ (* Running update-issue service on best effort basis *)
185+ try
186+ ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. update_issue_script [] );
187+ ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. kill_process_script [" -q" ; " -HUP" ; " mingetty" ; " agetty" ])
188+ with e ->
189+ debug " update_getty at %s caught exception: %s"
190+ __LOC__ (Printexc. to_string e)
191+
183192let set_gateway ~__context ~pif ~bridge =
184193 let dbg = Context. string_of_task __context in
185194 try
Original file line number Diff line number Diff line change @@ -294,7 +294,8 @@ let bring_up_management_if ~__context () =
294294 warn " Failed to acquire a management IP address"
295295 end ;
296296 (* Start the Host Internal Management Network, if needed. *)
297- Xapi_network. check_himn ~__context
297+ Xapi_network. check_himn ~__context;
298+ Helpers. update_getty ()
298299 with e ->
299300 debug " Caught exception bringing up management interface: %s" (ExnHelper. string_of_exn e)
300301
Original file line number Diff line number Diff line change @@ -165,15 +165,6 @@ let wait_for_management_ip ~__context =
165165 done ; end );
166166 ! ip
167167
168- let update_getty () =
169- (* Running update-issue service on best effort basis *)
170- try
171- ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. update_issue_script [] );
172- ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. kill_process_script [" -q" ; " -HUP" ; " mingetty" ; " agetty" ])
173- with e ->
174- debug " update_getty at %s caught exception: %s"
175- __LOC__ (Printexc. to_string e)
176-
177168let on_dom0_networking_change ~__context =
178169 debug " Checking to see if hostname or management IP has changed" ;
179170 (* Need to update:
@@ -196,13 +187,13 @@ let on_dom0_networking_change ~__context =
196187 debug " Changing Host.address in database to: %s" ip;
197188 Db.Host. set_address ~__context ~self: localhost ~value: ip;
198189 debug " Refreshing console URIs" ;
199- update_getty () ;
190+ Helpers. update_getty () ;
200191 Dbsync_master. refresh_console_urls ~__context
201192 end
202193 | None ->
203194 if Db.Host. get_address ~__context ~self: localhost <> " " then begin
204195 debug " Changing Host.address in database to: '' (host has no management IP address)" ;
205- update_getty () ;
196+ Helpers. update_getty () ;
206197 Db.Host. set_address ~__context ~self: localhost ~value: " "
207198 end
208199 end ;
You can’t perform that action at this time.
0 commit comments