Spurious errors from update-initramfs
Bug #76131 reported by
Pappan
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Fix Released
|
Undecided
|
Pappan |
Bug Description
Binary package hint: initramfs-tools
Symptom:
During update-initramfs, we see error messages from mkinitramfs of the following form.
sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.
[: 89: Eft: unexpected operator
[: 89: Scene: unexpected operator
The command completes successfully but these errors are annoying.
Changed in initramfs-tools: | |
assignee: | nobody → ppadman |
status: | Unconfirmed → Confirmed |
To post a comment you must log in.
This can be easily reproduced by having files or directories that contain spaces in "/"
The sequence of the problem is below:
In /usr/sbin/ mkinitramfs:
87 # Check that we're using a new enough kernel version, first for ourselves, initramfs- tools/hooks
88 # then for each of the hooks, which can have a MINKVER variable defined
89 check_minkver ${version}
90 check_minkver ${version} /usr/share/
91 check_minkver ${version} ${CONFDIR}/hooks
The "check_minkver ${version}" calls without a second paramter.
In /usr/share/ initramfs- tools/hook- functions
set_initlist was called whether or not a second parameter was given to check_minkver
In /usr/share/ initramfs- tools/scripts/ functions:
set_initlist()
continue
initlist= "${initlist} $(basename ${si_x})"
{
unset initlist
for si_x in ${initdir}/*; do
if [ ! -x ${si_x} ]; then
fi
done
}
$(initdir} is empty so it became "/*" and resulted in the bug