mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-27 20:56:55 +00:00
busybox-initramfs: add fsck for local disks, actually supported for ext2-4, vfat/msdos and hfs/hfs+ partitions
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
ba04e6569c
commit
950baeb288
@ -274,6 +274,8 @@
|
|||||||
LABEL=*|UUID=*|/*)
|
LABEL=*|UUID=*|/*)
|
||||||
MOUNT_CMD="mount_common"
|
MOUNT_CMD="mount_common"
|
||||||
MOUNT_TARGET="$1"
|
MOUNT_TARGET="$1"
|
||||||
|
# check filesystem
|
||||||
|
/sbin/fsck -a $1 &>/dev/null
|
||||||
;;
|
;;
|
||||||
CIFS=*|SMB=*)
|
CIFS=*|SMB=*)
|
||||||
MOUNT_CMD="mount_cifs"
|
MOUNT_CMD="mount_cifs"
|
||||||
@ -328,23 +330,6 @@
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
hfsdiskprep() {
|
|
||||||
for DEVICE in /dev/sd*; do
|
|
||||||
for device in $(/bin/busybox blkid $DEVICE); do
|
|
||||||
case $device in
|
|
||||||
TYPE=*)
|
|
||||||
FS_TYPE=${device#TYPE=}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$FS_TYPE" = "\"hfs\"" -o "$FS_TYPE" = "\"hfsplus\"" ]; then
|
|
||||||
progress "check filesystem $DEVICE [$FS_TYPE]..."
|
|
||||||
/bin/fsck_hfs -r -y $DEVICE >&$SILENT_OUT 2>&1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
load_modules() {
|
load_modules() {
|
||||||
progress "Loading kernel modules"
|
progress "Loading kernel modules"
|
||||||
|
|
||||||
@ -379,15 +364,6 @@
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_disks() {
|
|
||||||
progress "Checking disks"
|
|
||||||
|
|
||||||
if [ -x /bin/fsck_hfs ]; then
|
|
||||||
# deal with hfs partitions
|
|
||||||
hfsdiskprep
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
mount_flash() {
|
mount_flash() {
|
||||||
progress "Mounting flash"
|
progress "Mounting flash"
|
||||||
|
|
||||||
@ -589,7 +565,6 @@
|
|||||||
# main boot sequence
|
# main boot sequence
|
||||||
for BOOT_STEP in \
|
for BOOT_STEP in \
|
||||||
load_modules \
|
load_modules \
|
||||||
check_disks \
|
|
||||||
mount_flash \
|
mount_flash \
|
||||||
load_splash \
|
load_splash \
|
||||||
mount_storage \
|
mount_storage \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user