mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
busybox-initramfs: optimize disk check function in init script
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
f26a86e0bd
commit
07610579a1
@ -79,7 +79,7 @@ REBOOT="0"
|
|||||||
break
|
break
|
||||||
else
|
else
|
||||||
if [ -f "/sbin/ply-image" ]; then
|
if [ -f "/sbin/ply-image" ]; then
|
||||||
/sbin/ply-image "$SPLASHIMAGE"
|
/sbin/ply-image "$SPLASHIMAGE" &
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -119,11 +119,18 @@ REBOOT="0"
|
|||||||
}
|
}
|
||||||
|
|
||||||
hfsdiskprep() {
|
hfsdiskprep() {
|
||||||
for DEV in `/bin/busybox ls /dev/sd*`; do
|
for DEVICE in /dev/sd*; do
|
||||||
FS_TYPE=$(/sbin/blkid -o value -s TYPE $DEV)
|
for device in $(/bin/busybox blkid $DEVICE); do
|
||||||
if [ "$FS_TYPE" = "hfs" -o "$FS_TYPE" = "hfsplus" ]; then
|
case $device in
|
||||||
progress "check filesystem $DEV ..."
|
TYPE=*)
|
||||||
/sbin/fsck_hfs -r -y $DEV > /dev/null 2>&1
|
FS_TYPE=${device#TYPE=}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$FS_TYPE" = "\"hfs\"" -o "$FS_TYPE" = "\"hfsplus\"" ]; then
|
||||||
|
progress "check filesystem $DEVICE [$FS_TYPE]..."
|
||||||
|
/sbin/fsck_hfs -r -y $DEVICE > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -135,12 +142,12 @@ REBOOT="0"
|
|||||||
|
|
||||||
mount_part "$boot" "/flash" "ro,noatime"
|
mount_part "$boot" "/flash" "ro,noatime"
|
||||||
|
|
||||||
|
show_splash
|
||||||
|
|
||||||
if [ -f "/flash/MACH_KERNEL" ]; then
|
if [ -f "/flash/MACH_KERNEL" ]; then
|
||||||
IMAGE_KERNEL="MACH_KERNEL"
|
IMAGE_KERNEL="MACH_KERNEL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
show_splash
|
|
||||||
|
|
||||||
if [ -n "$disk" ]; then
|
if [ -n "$disk" ]; then
|
||||||
mount_part "$disk" "/storage" "rw,noatime"
|
mount_part "$disk" "/storage" "rw,noatime"
|
||||||
update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL"
|
update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user