Displaying 8 results from an estimated 8 matches for "bootloader_type_of_filenam".
Did you mean:
bootloader_type_of_filename
2016 Nov 01
3
[PATCH v3] v2v: bootloaders: search grub config for all distributions
...ub_config =
let grub2_mkconfig_cmd =
let elems = [
@@ -333,34 +341,42 @@ object (self)
ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |])
end
+(* We can determine if the bootloader config file is grub 1 or
+ * grub 2 just by looking at the filename.
+ *)
+let bootloader_type_of_filename path =
+ if String.is_suffix path "/grub.cfg" then
+ Some Grub2
+ else if String.is_suffix path "/grub.conf" ||
+ String.is_suffix path "/menu.lst" then
+ Some Grub1
+ else
+ None
+
+(* Where to start searching for bootloaders. *)
+let bootloader_...
2016 Nov 01
0
Re: [PATCH v3] v2v: bootloaders: search grub config for all distributions
...; let elems = [
> @@ -333,34 +341,42 @@ object (self)
> ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |])
> end
>
> +(* We can determine if the bootloader config file is grub 1 or
> + * grub 2 just by looking at the filename.
> + *)
> +let bootloader_type_of_filename path =
> + if String.is_suffix path "/grub.cfg" then
> + Some Grub2
> + else if String.is_suffix path "/grub.conf" ||
> + String.is_suffix path "/menu.lst" then
> + Some Grub1
> + else
> + None
Our String.is_suffix is a does...
2016 Nov 10
0
[PATCH v5 1/3] v2v: bootloaders: search grub config for all distributions
...=
+ try List.map ((^) mp) (Array.to_list (g#find mp))
+ with G.Error msg ->
+ error (f_"could not find bootloader mount point (%s): %s") mp msg in
+
+ (* We can determine if the bootloader config file is grub 1 or
+ * grub 2 just by looking at the filename.
+ *)
+ let bootloader_type_of_filename path =
+ match last_part_of path '/' with
+ | Some "grub.cfg" -> Some Grub2
+ | Some ("grub.conf" | "menu.lst") -> Some Grub1
+ | Some _
+ | None -> None
+ in
+
+ let grub_config, typ =
+ let rec loop = function
+ | [] -> e...
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...y.to_list (g#find mp))
> + with G.Error msg ->
> + error (f_"could not find bootloader mount point (%s): %s") mp msg in
> +
> + (* We can determine if the bootloader config file is grub 1 or
> + * grub 2 just by looking at the filename.
> + *)
> + let bootloader_type_of_filename path =
> + match last_part_of path '/' with
> + | Some "grub.cfg" -> Some Grub2
> + | Some ("grub.conf" | "menu.lst") -> Some Grub1
> + | Some _
> + | None -> None
> + in
> +
> + let grub_config, typ =
> +...
2017 May 02
2
[PATCH] v2v: bootloaders: search grub config for all distributions
...=
+ try List.map ((^) mp) (Array.to_list (g#find mp))
+ with G.Error msg ->
+ error (f_"could not find bootloader mount point (%s): %s") mp msg in
+
+ (* We can determine if the bootloader config file is grub 1 or
+ * grub 2 just by looking at the filename.
+ *)
+ let bootloader_type_of_filename path =
+ match last_part_of path '/' with
+ | Some "grub.cfg" -> Some Grub2
+ | Some ("grub.conf" | "menu.lst") -> Some Grub1
+ | Some _
+ | None -> None
+ in
+
+ let grub_config, typ =
+ let rec loop = function
+ | [] -> e...
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...g ->
> >>+ error (f_"could not find bootloader mount point (%s): %s") mp msg in
> >>+
> >>+ (* We can determine if the bootloader config file is grub 1 or
> >>+ * grub 2 just by looking at the filename.
> >>+ *)
> >>+ let bootloader_type_of_filename path =
> >>+ match last_part_of path '/' with
> >>+ | Some "grub.cfg" -> Some Grub2
> >>+ | Some ("grub.conf" | "menu.lst") -> Some Grub1
> >>+ | Some _
> >>+ | None -> None
> >>+ i...
2016 Nov 02
4
[PATCH v4 1/2] v2v: bootloaders: search grub config for all distributions
...=
+ try List.map ((^) mp) (Array.to_list (g#find mp))
+ with G.Error msg ->
+ error (f_"could not find bootloader mount point (%s): %s") mp msg in
+
+ (* We can determine if the bootloader config file is grub 1 or
+ * grub 2 just by looking at the filename.
+ *)
+ let bootloader_type_of_filename path =
+ match last_part_of path '/' with
+ | Some "grub.cfg" -> Some Grub2
+ | Some ("grub.conf" | "menu.lst") -> Some Grub1
+ | Some _
+ | None -> None
+ in
+
+ let grub_config, typ =
+ let rec loop = function
+ | [] -> e...
2016 Nov 10
5
[PATCH v5 0/3] v2v and augeas
Augeas 1.7.0 was released a couple of days ago. By encouraging
everyone to upgrade to this we can drop several calls to aug_transform
and also our custom copies of two lenses, and a lot of related code.
Rich.