mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
busybox-initramfs:
- simplyfing update script a little bit
This commit is contained in:
parent
770e773f88
commit
5f12716fee
@ -10,6 +10,7 @@
|
||||
|
||||
IMAGE_SYSTEM="SYSTEM"
|
||||
IMAGE_KERNEL="KERNEL"
|
||||
REBOOT=0
|
||||
|
||||
# parse command line arguments
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
@ -56,16 +57,20 @@
|
||||
/bin/busybox mv $UPDATE_DIR/$2 $3
|
||||
/bin/busybox mount -o remount,ro /flash
|
||||
/bin/busybox sync
|
||||
[ $4 = "reboot" ] && REBOOT="reboot"
|
||||
[ $2 = $IMAGE_KERNEL ] && REBOOT=1
|
||||
fi
|
||||
}
|
||||
|
||||
mount_part "$boot" "/flash" "ro,noatime"
|
||||
mount_part "$disk" "/storage" "rw,noatime"
|
||||
|
||||
update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL" "reboot"
|
||||
update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL"
|
||||
update "System" "$IMAGE_SYSTEM" "/flash/$IMAGE_SYSTEM"
|
||||
[ $REBOOT = "reboot" ] && echo "System reboots now..." && /bin/busybox reboot
|
||||
|
||||
if test "$REBOOT" -eq 1; then
|
||||
echo "System reboots now..." && \
|
||||
/bin/busybox reboot
|
||||
fi
|
||||
|
||||
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
|
||||
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "loop"
|
||||
|
Loading…
x
Reference in New Issue
Block a user