[Bug 1873614] Re: Definition of add_mountroot_fail_hook doesnt match lvm2's usage
lerxst
shobhitsaxena at yahoo.com
Fri Apr 24 16:42:29 UTC 2020
I'm noticing the same behavior. Please fix!
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1873614
Title:
Definition of add_mountroot_fail_hook doesnt match lvm2's usage
Status in initramfs-tools package in Ubuntu:
Confirmed
Bug description:
Package lvm2 contains a init-premount script named /usr/share
/initramfs-tools/scripts/init-premount/lvm2
In this script there is the function call:
add_mountroot_fail_hook "20-lvm2"
Which is defined in /usr/share/initramfs-tools/scripts/functions
In focal's 0.136ubuntu6 , this is defined as:
add_mountroot_fail_hook()
{
mkdir -p /tmp/mountroot-fail-hooks.d
ln -s "$0" /tmp/mountroot-fail-hooks.d/"$0"
}
The final line of the function will execute as
ln -s "/scripts/lvm2" /tmp/mountroot-fail-hooks.d/"/scripts/lvm2"
And fail, because directory /tmp/mountroot-fail-hooks.d/scripts does
not exist.
It is clear from lvm2's invocation that it expects the symlink to be
named "20-lvm2" , and if we look at bionic's 0.130ubuntu3.6 that is
the case:
add_mountroot_fail_hook()
{
mkdir -p /tmp/mountroot-fail-hooks.d
ln -s "$0" /tmp/mountroot-fail-hooks.d/"$1"
}
focal's version needs to be updated to either support the "$1"
argument or strip the directory from "$0".
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1873614/+subscriptions
More information about the foundations-bugs
mailing list