diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index b432fdd47..f1a710d60 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -173,10 +173,10 @@ let convert (g : G.guestfs) inspect source output rcaps = (try let lines = g#read_lines "/etc/rc.local" in let lines = Array.to_list lines in - let rex = Str.regexp ".*\\b\\(insmod|modprobe\\)\b.*\\bxen-vbd.*" in + let rex = PCRE.compile "\\b(insmod|modprobe)\\b.*\\bxen-vbd" in let lines = List.map ( fun s -> - if Str.string_match rex s 0 then + if PCRE.matches rex s then "#" ^ s else s