Problem identified. The variable intrd_device contains a \r at the end of the variable. When concatenating the variable with the subsequent variables, it effectively truncates the subsequent data in the echo return.
Preceding the if statement, I inserted the following:
# remove the trailing \r from the variable
initrd_device=$(echo ${initrd_device} | tr -d '\r')
This removed the trailing \r, allowing the full set of data to be returned.
I tested this fix on my own system by modifying the 10_linux_zfs script in /etc/grub.d. The grub.cfg is now successfully generated and apt/dpkg are able to perform an update-grub.
Problem identified. The variable intrd_device contains a \r at the end of the variable. When concatenating the variable with the subsequent variables, it effectively truncates the subsequent data in the echo return.
Preceding the if statement, I inserted the following:
# remove the trailing \r from the variable device= $(echo ${initrd_device} | tr -d '\r')
initrd_
This removed the trailing \r, allowing the full set of data to be returned.
I tested this fix on my own system by modifying the 10_linux_zfs script in /etc/grub.d. The grub.cfg is now successfully generated and apt/dpkg are able to perform an update-grub.
10_linux_zfs attached.