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 @@ -185,6 +185,15 @@ let update_pif_address ~__context ~self =
185185 with _ ->
186186 debug " Bridge %s is not up; not updating IP" bridge
187187
188+ let update_getty () =
189+ (* Running update-issue service on best effort basis *)
190+ try
191+ ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. update_issue_script [] );
192+ ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. kill_process_script [" -q" ; " -HUP" ; " mingetty" ; " agetty" ])
193+ with e ->
194+ debug " update_getty at %s caught exception: %s"
195+ __LOC__ (Printexc. to_string e)
196+
188197let set_gateway ~__context ~pif ~bridge =
189198 let dbg = Context. string_of_task __context in
190199 try
Original file line number Diff line number Diff line change @@ -300,7 +300,8 @@ let bring_up_management_if ~__context () =
300300 warn " Failed to acquire a management IP address"
301301 end ;
302302 (* Start the Host Internal Management Network, if needed. *)
303- Xapi_network. check_himn ~__context
303+ Xapi_network. check_himn ~__context;
304+ Helpers. update_getty ()
304305 with e ->
305306 debug " Caught exception bringing up management interface: %s" (ExnHelper. string_of_exn e)
306307
Original file line number Diff line number Diff line change @@ -167,15 +167,6 @@ let wait_for_management_ip ~__context =
167167 done ; end );
168168 ! ip
169169
170- let update_getty () =
171- (* Running update-issue service on best effort basis *)
172- try
173- ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. update_issue_script [] );
174- ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. kill_process_script [" -q" ; " -HUP" ; " mingetty" ; " agetty" ])
175- with e ->
176- debug " update_getty at %s caught exception: %s"
177- __LOC__ (Printexc. to_string e)
178-
179170let on_dom0_networking_change ~__context =
180171 debug " Checking to see if hostname or management IP has changed" ;
181172 (* Need to update:
@@ -198,13 +189,13 @@ let on_dom0_networking_change ~__context =
198189 debug " Changing Host.address in database to: %s" ip;
199190 Db.Host. set_address ~__context ~self: localhost ~value: ip;
200191 debug " Refreshing console URIs" ;
201- update_getty () ;
192+ Helpers. update_getty () ;
202193 Dbsync_master. refresh_console_urls ~__context
203194 end
204195 | None ->
205196 if Db.Host. get_address ~__context ~self: localhost <> " " then begin
206197 debug " Changing Host.address in database to: '' (host has no management IP address)" ;
207- update_getty () ;
198+ Helpers. update_getty () ;
208199 Db.Host. set_address ~__context ~self: localhost ~value: " "
209200 end
210201 end ;
You can’t perform that action at this time.
0 commit comments