mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
busybox-initramfs: init: cosmetics
This commit is contained in:
parent
5450520500
commit
1f14eb6a37
@ -22,12 +22,12 @@
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
# mount all needed special filesystems
|
||||
# mount all needed special filesystems
|
||||
/bin/busybox mount -t devtmpfs devtmpfs /dev
|
||||
/bin/busybox mount -t proc proc /proc
|
||||
/bin/busybox mount -t sysfs sysfs /sys
|
||||
|
||||
# set needed variables
|
||||
# set needed variables
|
||||
MODULE_DIR=/lib/modules
|
||||
|
||||
UPDATE_DIR=/storage/.update
|
||||
@ -49,19 +49,19 @@
|
||||
INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'`
|
||||
SYSTEM_TORAM_LIMIT=1024000
|
||||
|
||||
# load any configuration
|
||||
# load any configuration
|
||||
if [ -f "/etc/initramfs.conf" ]; then
|
||||
. /etc/initramfs.conf
|
||||
fi
|
||||
|
||||
# hide kernel log messages on console
|
||||
# hide kernel log messages on console
|
||||
echo '1 4 1 7' > /proc/sys/kernel/printk
|
||||
|
||||
# clear screen and hide cursor
|
||||
# clear screen and hide cursor
|
||||
clear
|
||||
echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink
|
||||
|
||||
# parse command line arguments
|
||||
# parse command line arguments
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
case $arg in
|
||||
BOOT_IMAGE=*)
|
||||
@ -527,7 +527,8 @@
|
||||
fi
|
||||
|
||||
# check md5 sums if .nocheck doesn't exist
|
||||
if [ "$MD5_NOCHECK" -eq "0" -a -f "$UPDATE_DIR/${UPDATE_KERNEL}.md5" -a -f "$UPDATE_DIR/${UPDATE_SYSTEM}.md5" ] ; then
|
||||
if [ "$MD5_NOCHECK" -eq "0" ] ; then
|
||||
if [ -f "$UPDATE_DIR/${UPDATE_KERNEL}.md5" -a -f "$UPDATE_DIR/${UPDATE_SYSTEM}.md5" ] ; then
|
||||
sed -i 's#target#/storage/.update#g' "$UPDATE_DIR/${UPDATE_KERNEL}.md5"
|
||||
sed -i 's#target#/storage/.update#g' "$UPDATE_DIR/${UPDATE_SYSTEM}.md5"
|
||||
|
||||
@ -540,6 +541,7 @@
|
||||
echo "missing ${UPDATE_KERNEL}.md5 or ${UPDATE_SYSTEM}.md5..."
|
||||
MD5_FAILED="1"
|
||||
fi
|
||||
fi
|
||||
|
||||
# get sizes
|
||||
FLASH_FREE=$(df /flash/ | awk '/[0-9]%/{print $4}')
|
||||
@ -615,7 +617,7 @@
|
||||
error "check arguments" "boot argument can't be FILE type..."
|
||||
fi
|
||||
|
||||
# main boot sequence
|
||||
# main boot sequence
|
||||
for BOOT_STEP in \
|
||||
load_modules \
|
||||
check_disks \
|
||||
@ -630,20 +632,20 @@
|
||||
|
||||
BOOT_STEP=final
|
||||
|
||||
# move some special filesystems
|
||||
# move some special filesystems
|
||||
/bin/busybox mount --move /dev /sysroot/dev
|
||||
/bin/busybox mount --move /proc /sysroot/proc
|
||||
/bin/busybox mount --move /sys /sysroot/sys
|
||||
|
||||
# tell OE settings addon to disable updates
|
||||
# tell OE settings addon to disable updates
|
||||
if [ "$UPDATE_DISABLED" = "yes" ] ; then
|
||||
echo "" > /sysroot/dev/.update_disabled
|
||||
fi
|
||||
# swap can not be used over nfs.(see scripts/mount-swap)
|
||||
# swap can not be used over nfs.(see scripts/mount-swap)
|
||||
if [ "$STORAGE_NETBOOT" = "yes" ] ; then
|
||||
echo "" > /sysroot/dev/.storage_netboot
|
||||
fi
|
||||
# switch to new sysroot and start real init
|
||||
# switch to new sysroot and start real init
|
||||
exec /bin/busybox switch_root /sysroot /lib/systemd/systemd $INIT_ARGS
|
||||
|
||||
error "switch_root" "Error in initramfs. Could not switch to new root"
|
||||
|
Loading…
x
Reference in New Issue
Block a user