File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,17 @@ let read_management_conf () =
4848 else None
4949 in
5050 let nameservers =
51- if List. mem_assoc " DNS" args && List. assoc " DNS" args <> " " then
52- List. map Unix. inet_addr_of_string (String. split ',' (List. assoc " DNS" args))
51+ if List. mem_assoc " DNS1" args && List. assoc " DNS1" args <> " " then
52+ args |> List. fold_left (fun accum (k , v ) ->
53+ try Scanf. sscanf k " DNS%d" (fun i -> (i, String. split ',' v) :: accum)
54+ with _ -> accum) []
55+ |> List. sort (fun (k1 , _ ) (k2 , _ ) -> k1- k2)
56+ |> List. map snd |> List. concat
57+ else if List. mem_assoc " DNS" args && List. assoc " DNS" args <> " " then
58+ String. split ',' (List. assoc " DNS" args)
5359 else []
5460 in
61+ let nameservers = List. map Unix. inet_addr_of_string nameservers in
5562 let domains =
5663 if List. mem_assoc " DOMAIN" args && List. assoc " DOMAIN" args <> " " then
5764 String. split ' ' (List. assoc " DOMAIN" args)
You can’t perform that action at this time.
0 commit comments