mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
Merge branch 'small-fixes' into 'debian/latest'
Some small fixes See merge request kernel-team/initramfs-tools!153
This commit is contained in:
commit
731307071d
@ -24,7 +24,8 @@ if [ -n "$RESUME" ] && [ "$RESUME" != auto ]; then
|
||||
exit 0
|
||||
fi
|
||||
if resume_dev_node="$(resolve_device "$RESUME")" && \
|
||||
blkid -p -n swap "$resume_dev_node" >/dev/null 2>&1; then
|
||||
resume_dev_type=$(blkid -p -s TYPE -o value "$resume_dev_node") && \
|
||||
[ "$resume_dev_type" = swap ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
5
init
5
init
@ -101,7 +101,10 @@ for x in $(cat /proc/cmdline); do
|
||||
ROOTFLAGS="-o ${x#rootflags=}"
|
||||
;;
|
||||
rootfstype=*)
|
||||
ROOTFSTYPE="${x#rootfstype=}"
|
||||
# Linux interprets 'rootfstype=*tmpfs*' to control the
|
||||
# initramfs filesystem; we should remove 'tmpfs' from
|
||||
# the list
|
||||
ROOTFSTYPE="$(list_filter_out "${x#rootfstype=}" tmpfs)"
|
||||
;;
|
||||
rootdelay=*)
|
||||
ROOTDELAY="${x#rootdelay=}"
|
||||
|
||||
@ -660,6 +660,31 @@ mountfs()
|
||||
${type}_mount_fs "$1"
|
||||
}
|
||||
|
||||
# Filter matching items out of a comma-separated list.
|
||||
# $1=list
|
||||
# $2=pattern to match (may include shell wildcards)
|
||||
list_filter_out()
|
||||
{
|
||||
local pattern="$2"
|
||||
local item result
|
||||
local IFS=,
|
||||
set -f
|
||||
# shellcheck disable=SC2086
|
||||
set -- $1
|
||||
set +f
|
||||
for item in "$@"; do
|
||||
# shellcheck disable=SC2254
|
||||
case "$item" in
|
||||
$pattern)
|
||||
;;
|
||||
*)
|
||||
result="${result:+$result,}${item}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
# Mount the root file system. It should be overridden by all
|
||||
# boot scripts.
|
||||
mountroot()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user