mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Revert "busybox-initramfs: add fsck for local disks, actually supported for ext2-4, vfat/msdos and hfs/hfs+ partitions"
This reverts commit 950baeb288efc9b74254ec53ce9d3d28960fe02c. Conflicts: packages/initramfs/sysutils/busybox-initramfs/scripts/init
This commit is contained in:
parent
9c56370a56
commit
f7783cfde4
@ -270,10 +270,6 @@
|
||||
LABEL=*|UUID=*|/*)
|
||||
MOUNT_CMD="mount_common"
|
||||
MOUNT_TARGET="$1"
|
||||
# check filesystem
|
||||
if [ -x /sbin/fsck ]; then
|
||||
/sbin/fsck -a $1 &>/dev/null
|
||||
fi
|
||||
;;
|
||||
CIFS=*|SMB=*)
|
||||
MOUNT_CMD="mount_cifs"
|
||||
@ -325,6 +321,23 @@
|
||||
umount /sysroot
|
||||
}
|
||||
|
||||
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() {
|
||||
progress "Loading kernel modules"
|
||||
|
||||
@ -368,6 +381,15 @@
|
||||
fi
|
||||
}
|
||||
|
||||
check_disks() {
|
||||
progress "Checking disks"
|
||||
|
||||
if [ -x /bin/fsck_hfs ]; then
|
||||
# deal with hfs partitions
|
||||
hfsdiskprep
|
||||
fi
|
||||
}
|
||||
|
||||
mount_flash() {
|
||||
progress "Mounting flash"
|
||||
|
||||
@ -553,6 +575,7 @@
|
||||
# main boot sequence
|
||||
for BOOT_STEP in \
|
||||
load_modules \
|
||||
check_disks \
|
||||
mount_flash \
|
||||
load_splash \
|
||||
mount_storage \
|
||||
|
@ -24,7 +24,5 @@
|
||||
|
||||
DISKDEV_CMDS_DIR="$BUILD/diskdev_cmds-*"
|
||||
|
||||
mkdir -p $INSTALL/sbin
|
||||
cp $DISKDEV_CMDS_DIR/fsck_hfs.tproj/fsck_hfs $INSTALL/sbin
|
||||
ln -sf fsck_hfs $INSTALL/sbin/fsck.hfs
|
||||
ln -sf fsck_hfs $INSTALL/sbin/fsck.hfsplus
|
||||
mkdir -p $INSTALL/bin
|
||||
cp $DISKDEV_CMDS_DIR/fsck_hfs.tproj/fsck_hfs $INSTALL/bin
|
||||
|
Loading…
x
Reference in New Issue
Block a user