Skip to content

Commit 290cce1

Browse files
committed
Remove calls to obsolete network scripts
Signed-off-by: Rob Hoes <[email protected]>
1 parent 5d564d3 commit 290cce1

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

networkd/network_server.ml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ let network_conf = ref "/etc/xcp/network.conf"
2626
let config : config_t ref = ref Network_config.empty_config
2727
let 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-
3729
let 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

6047
let on_shutdown signal =
6148
let dbg = "shutdown" in

0 commit comments

Comments
 (0)