mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
hooks/fsck: Fix invocation of fstype at build time
get_fstab prefers to use the fstype utility (from klibc) and then falls back to blkid. Since klibc utilities are not in $PATH at build time, get_fsck_type_fstab defines fstype as an alias for its full filename before calling get_fstab. This never actually worked, because aliases are expanded during function definition, not execution. Replacing the alias and unalias with a shell function definition and an 'unset -f' solves the problem. Thanks: Simon Tatham <anakin@pobox.com> Closes: #865691 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
5bf4c29af2
commit
e8377b3c5f
@ -59,9 +59,9 @@ get_fsck_type_fstab () {
|
||||
# therefore never used at boot time
|
||||
if [ "${MNT_DIR}" = "/" ] || [ "${MNT_TYPE}" = "auto" ]; then
|
||||
MNT_FSNAME="$(resolve_device "${MNT_FSNAME}")"
|
||||
alias fstype="/usr/lib/klibc/bin/fstype"
|
||||
fstype() { "/usr/lib/klibc/bin/fstype" "$@"; }
|
||||
get_fstype "${MNT_FSNAME}"
|
||||
unalias fstype
|
||||
unset -f fstype
|
||||
else
|
||||
echo "${MNT_TYPE}"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user