@@ -26,14 +26,6 @@ let network_conf = ref "/etc/xcp/network.conf"
2626let config : config_t ref = ref Network_config. empty_config
2727let backend_kind = ref Openvswitch
2828
29- let legacy_management_interface_start () =
30- try
31- ignore (call_script " /opt/xensource/libexec/legacy-management-interface" [" start" ]);
32- debug " Upgrade: brought up interfaces using the old script. Xapi will sync up soon."
33- with e ->
34- debug " Error while configuring the management interface using the old script: %s\n %s"
35- (Printexc. to_string e) (Printexc. get_backtrace () )
36-
3729let write_config () =
3830 try
3931 Network_config. write_config ! config
@@ -44,18 +36,13 @@ let read_config () =
4436 config := Network_config. read_config () ;
4537 debug " Read configuration from networkd.db file."
4638 with Network_config. Read_error ->
47- (* No configuration file found. *)
48- (* Perhaps it is an upgrade from the pre-networkd era. If network.dbcache exists, try to configure the
49- * management interface using the old scripts. *)
50- if (try Unix. access (Filename. concat " /var/lib/xcp" " network.dbcache" ) [Unix. F_OK ]; true with _ -> false ) then
51- legacy_management_interface_start ()
52- else
53- (* Try to get the initial network setup from the first-boot data written by the host installer. *)
54- try
55- config := Network_config. read_management_conf () ;
56- debug " Read configuration from management.conf file."
57- with Network_config. Read_error ->
58- debug " Could not interpret the configuration in management.conf"
39+ (* No configuration file found. Try to get the initial network setup from
40+ * the first-boot data written by the host installer. *)
41+ try
42+ config := Network_config. read_management_conf () ;
43+ debug " Read configuration from management.conf file."
44+ with Network_config. Read_error ->
45+ debug " Could not interpret the configuration in management.conf"
5946
6047let on_shutdown signal =
6148 let dbg = " shutdown" in
0 commit comments