mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
v2v: linux: adapt initrd name for Debian
The name of the initrd image on Debian-based systems is different from what used on Fedora/RHEL/SUSE and derived; set a different regexp to avoid making the current regexp even more complex.
This commit is contained in:
@@ -96,7 +96,11 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
|
||||
let installed_kernels : kernel_info list =
|
||||
let rex_ko = Str.regexp ".*\\.k?o\\(\\.xz\\)?$" in
|
||||
let rex_ko_extract = Str.regexp ".*/\\([^/]+\\)\\.k?o\\(\\.xz\\)?$" in
|
||||
let rex_initrd = Str.regexp "^initr\\(d\\|amfs\\)-.*\\(\\.img\\)?$" in
|
||||
let rex_initrd =
|
||||
if family = `Debian_family then
|
||||
Str.regexp "^initrd.img-.*$"
|
||||
else
|
||||
Str.regexp "^initr\\(d\\|amfs\\)-.*\\(\\.img\\)?$" in
|
||||
filter_map (
|
||||
function
|
||||
| { G.app2_name = name } as app
|
||||
|
||||
Reference in New Issue
Block a user