mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +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
|
||||
else
|
||||
if [ -f "/sbin/ply-image" ]; then
|
||||
/sbin/ply-image "$SPLASHIMAGE"
|
||||
/sbin/ply-image "$SPLASHIMAGE" &
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@ -119,11 +119,18 @@ REBOOT="0"
|
||||
}
|
||||
|
||||
hfsdiskprep() {
|
||||
for DEV in `/bin/busybox ls /dev/sd*`; do
|
||||
FS_TYPE=$(/sbin/blkid -o value -s TYPE $DEV)
|
||||
if [ "$FS_TYPE" = "hfs" -o "$FS_TYPE" = "hfsplus" ]; then
|
||||
progress "check filesystem $DEV ..."
|
||||
/sbin/fsck_hfs -r -y $DEV > /dev/null 2>&1
|
||||
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]..."
|
||||
/sbin/fsck_hfs -r -y $DEVICE > /dev/null 2>&1
|
||||
fi
|
||||
done
|
||||
}
|
||||
@ -135,12 +142,12 @@ REBOOT="0"
|
||||
|
||||
mount_part "$boot" "/flash" "ro,noatime"
|
||||
|
||||
show_splash
|
||||
|
||||
if [ -f "/flash/MACH_KERNEL" ]; then
|
||||
IMAGE_KERNEL="MACH_KERNEL"
|
||||
fi
|
||||
|
||||
show_splash
|
||||
|
||||
if [ -n "$disk" ]; then
|
||||
mount_part "$disk" "/storage" "rw,noatime"
|
||||
update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL"
|
||||
|
Loading…
x
Reference in New Issue
Block a user