File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -722,7 +722,17 @@ module Linux_bonding = struct
722722 error " Bond %s does not exist; cannot set properties" master
723723end
724724
725- module Dhclient = struct
725+ module Dhclient :
726+ sig
727+ type interface = string
728+ val remove_conf_file : ?ipv6 : bool -> interface -> unit
729+ val is_running : ?ipv6 : bool -> interface -> bool
730+ val stop : ?ipv6 : bool -> interface -> unit
731+ val ensure_running : ?ipv6 : bool -> interface -> [> `dns of string | `gateway of string ] list -> unit
732+ end =
733+ struct
734+ type interface = string
735+
726736 let pid_file ?(ipv6 =false ) interface =
727737 let ipv6' = if ipv6 then " 6" else " " in
728738 Printf. sprintf " /var/run/dhclient%s-%s.pid" ipv6' interface
Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ module Interface = struct
327327 Sysctl. set_ipv6_autoconf name false ;
328328 Ip. flush_ip_addr ~ipv6: true name;
329329 Ip. set_ipv6_link_local_addr name;
330- ignore (Dhclient. start ~ipv6: true name [] )
330+ ignore (Dhclient. ensure_running ~ipv6: true name [] )
331331 | Autoconf6 ->
332332 if Dhclient. is_running ~ipv6: true name then
333333 ignore (Dhclient. stop ~ipv6: true name);
You can’t perform that action at this time.
0 commit comments