diff -Nru initramfs-tools-0.131ubuntu18/debian/changelog initramfs-tools-0.131ubuntu19/debian/changelog --- initramfs-tools-0.131ubuntu18/debian/changelog 2019-03-13 17:28:46.000000000 -0300 +++ initramfs-tools-0.131ubuntu19/debian/changelog 2019-03-26 14:49:29.000000000 -0300 @@ -1,3 +1,9 @@ +initramfs-tools (0.131ubuntu19) disco; urgency=medium + + * Add modules for nvme path components on multipath nvme. LP: #1778844 + + -- Thadeu Lima de Souza Cascardo Tue, 26 Mar 2019 14:49:29 -0300 + initramfs-tools (0.131ubuntu18) disco; urgency=medium * Explicitly record net autopkgtest dependency on isc-dhcp-client. diff -Nru initramfs-tools-0.131ubuntu18/hook-functions initramfs-tools-0.131ubuntu19/hook-functions --- initramfs-tools-0.131ubuntu18/hook-functions 2018-09-20 06:33:07.000000000 -0300 +++ initramfs-tools-0.131ubuntu19/hook-functions 2019-03-26 14:43:51.000000000 -0300 @@ -256,6 +256,21 @@ done } +nvme_dev_sys_walk_mod_add() +{ + local dev_sys_path component nvme_sys_path + dev_sys_path="$(readlink -f "$1")" + if ! echo "$dev_sys_path" | grep -q "nvme-subsys"; then + return + fi + for component in "$dev_sys_path"/nvme* ; do + if [ -L "$component" ] ; then + nvme_sys_path=$(readlink -f "$component") + sys_walk_mod_add "$nvme_sys_path" + fi + done +} + block_dev_sys_walk_mod_add() { local dev_sys_path disk_sys_path component @@ -274,6 +289,7 @@ ls -1 "$disk_sys_path/slaves" | while read component; do block_dev_sys_walk_mod_add "$disk_sys_path/slaves/$component" done + nvme_dev_sys_walk_mod_add "$disk_sys_path/device" sys_walk_mod_add ${dev_sys_path} }