mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
Add FSTYPE config parameter to allow overriding filesystem type detection
This is needed for testing, and should also be useful for building more generic initramfs images. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
9877542bcf
commit
4309c3bcd9
@ -66,3 +66,12 @@ NFSROOT=auto
|
||||
#
|
||||
|
||||
RUNSIZE=10%
|
||||
|
||||
#
|
||||
# FSTYPE: ...
|
||||
#
|
||||
# The filesytem type(s) to support, or "auto" to use the current root
|
||||
# filesystem type
|
||||
#
|
||||
|
||||
FSTYPE=auto
|
||||
|
||||
14
hooks/fsck
14
hooks/fsck
@ -64,8 +64,18 @@ get_fsck_type_fstab () {
|
||||
}
|
||||
|
||||
get_fsck_types() {
|
||||
get_fsck_type_fstab / root
|
||||
get_fsck_type_fstab /usr /usr
|
||||
if [ "${FSTYPE:-auto}" = auto ]; then
|
||||
get_fsck_type_fstab / root
|
||||
get_fsck_type_fstab /usr usr
|
||||
else
|
||||
local IFS=,
|
||||
local fstype
|
||||
set -f
|
||||
for fstype in $FSTYPE; do
|
||||
echo "$fstype"
|
||||
done
|
||||
set +f
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
|
||||
@ -93,6 +93,12 @@ or is set to \fIauto\fP,
|
||||
will automatically select the largest available swap partition.
|
||||
Set it to \fInone\fP to disable resume from disk.
|
||||
|
||||
.TP
|
||||
\fB FSTYPE
|
||||
Specifies the filesystem type(s) to support, separated by commas. If
|
||||
this is not defined or is set to \fIauto\fP, \fBmkinitramfs\fP will
|
||||
automatically detect the current root and \fI/usr\fP filesystem types.
|
||||
|
||||
.SH VARIABLES FOR NFS BOOT
|
||||
.TP
|
||||
\fB DEVICE
|
||||
|
||||
@ -247,6 +247,7 @@ export KEYMAP
|
||||
export MODULES
|
||||
export BUSYBOX
|
||||
export RESUME
|
||||
export FSTYPE
|
||||
|
||||
# Private, used by 'catenate_cpiogz'.
|
||||
export __TMPCPIOGZ
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user