mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
busybox & busybox-initramfs: clean up fastboot
This commit is contained in:
parent
b7a9574ea6
commit
bf38c48586
@ -88,9 +88,6 @@
|
|||||||
progress)
|
progress)
|
||||||
PROGRESS=yes
|
PROGRESS=yes
|
||||||
;;
|
;;
|
||||||
fastboot)
|
|
||||||
FASTBOOT=yes
|
|
||||||
;;
|
|
||||||
nosplash)
|
nosplash)
|
||||||
SPLASH=no
|
SPLASH=no
|
||||||
;;
|
;;
|
||||||
@ -106,10 +103,6 @@
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if test "$FASTBOOT" = "yes"; then
|
|
||||||
IONICE="/bin/busybox ionice -c 1 -n 0"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$DEBUG" = "yes"; then
|
if test "$DEBUG" = "yes"; then
|
||||||
exec 3>&1
|
exec 3>&1
|
||||||
else
|
else
|
||||||
@ -164,7 +157,7 @@
|
|||||||
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
|
||||||
ERR_ENV=1
|
ERR_ENV=1
|
||||||
|
|
||||||
$IONICE /bin/busybox mount $MOUNT_OPTIONS $1 $2 >&$SILENT_OUT 2>&1
|
/bin/busybox mount $MOUNT_OPTIONS $1 $2 >&$SILENT_OUT 2>&1
|
||||||
[ "$?" -eq "0" ] && ERR_ENV=0 && break
|
[ "$?" -eq "0" ] && ERR_ENV=0 && break
|
||||||
|
|
||||||
/bin/busybox usleep 1000000
|
/bin/busybox usleep 1000000
|
||||||
@ -253,7 +246,7 @@
|
|||||||
NBD_PORT="${1#*:}"
|
NBD_PORT="${1#*:}"
|
||||||
NBD_DEV="/dev/nbd$NBD_DEVS"
|
NBD_DEV="/dev/nbd$NBD_DEVS"
|
||||||
|
|
||||||
$IONICE /bin/busybox nbd-client $NBD_SERVER $NBD_PORT $NBD_DEV >&$SILENT_OUT 2>&1 || \
|
/bin/busybox nbd-client $NBD_SERVER $NBD_PORT $NBD_DEV >&$SILENT_OUT 2>&1 || \
|
||||||
error "nbd-client" "Could not connect to NBD server $1"
|
error "nbd-client" "Could not connect to NBD server $1"
|
||||||
|
|
||||||
mount_common "$NBD_DEV" "$2" "$3" "$4"
|
mount_common "$NBD_DEV" "$2" "$3" "$4"
|
||||||
@ -307,13 +300,13 @@
|
|||||||
update() {
|
update() {
|
||||||
if [ -f "$UPDATE_DIR/$2" -a -f "$3" ]; then
|
if [ -f "$UPDATE_DIR/$2" -a -f "$3" ]; then
|
||||||
echo "updating $1..."
|
echo "updating $1..."
|
||||||
$IONICE /bin/busybox mount -o remount,rw /flash
|
/bin/busybox mount -o remount,rw /flash
|
||||||
$IONICE /bin/busybox mv $UPDATE_DIR/$2 $3
|
/bin/busybox mv $UPDATE_DIR/$2 $3
|
||||||
# loopback file needs writable /flash all the time
|
# loopback file needs writable /flash all the time
|
||||||
if [ "${disk%%=*}" != "FILE" ]; then
|
if [ "${disk%%=*}" != "FILE" ]; then
|
||||||
$IONICE /bin/busybox mount -o remount,ro /flash
|
/bin/busybox mount -o remount,ro /flash
|
||||||
fi
|
fi
|
||||||
$IONICE /bin/busybox sync
|
/bin/busybox sync
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,8 +320,8 @@
|
|||||||
|
|
||||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/update.sh ]; then
|
if [ -f $SYSTEM_ROOT/usr/share/bootloader/update.sh ]; then
|
||||||
echo "updating Bootloader..."
|
echo "updating Bootloader..."
|
||||||
$IONICE /bin/busybox sh $SYSTEM_ROOT/usr/share/bootloader/update.sh
|
/bin/busybox sh $SYSTEM_ROOT/usr/share/bootloader/update.sh
|
||||||
$IONICE /bin/busybox sync
|
/bin/busybox sync
|
||||||
fi
|
fi
|
||||||
|
|
||||||
umount /sysroot
|
umount /sysroot
|
||||||
@ -408,7 +401,7 @@
|
|||||||
if [ "${disk%%=*}" = "FILE" ]; then
|
if [ "${disk%%=*}" = "FILE" ]; then
|
||||||
target="${disk%%,*}"
|
target="${disk%%,*}"
|
||||||
storage_loop_file="/flash/${target#*=}"
|
storage_loop_file="/flash/${target#*=}"
|
||||||
$IONICE /bin/busybox mount -o remount,rw /flash
|
/bin/busybox mount -o remount,rw /flash
|
||||||
|
|
||||||
if [ ! -f "$storage_loop_file" ]; then
|
if [ ! -f "$storage_loop_file" ]; then
|
||||||
echo "Creating storage loopback file: $storage_loop_file..."
|
echo "Creating storage loopback file: $storage_loop_file..."
|
||||||
|
@ -36,20 +36,12 @@
|
|||||||
progress)
|
progress)
|
||||||
PROGRESS=yes
|
PROGRESS=yes
|
||||||
;;
|
;;
|
||||||
fastboot)
|
|
||||||
FASTBOOT=yes
|
|
||||||
;;
|
|
||||||
nosplash)
|
nosplash)
|
||||||
SPLASH=no
|
SPLASH=no
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# setting some Variables
|
|
||||||
[ "$FASTBOOT" = "yes" ] && \
|
|
||||||
IONICE="ionice -c 1 -n 0" && \
|
|
||||||
NICE_20="nice -n 20"
|
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
progress() {
|
progress() {
|
||||||
if test "$PROGRESS" = yes; then
|
if test "$PROGRESS" = yes; then
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
# This file is part of OpenELEC - http://www.openelec.tv
|
|
||||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
|
||||||
#
|
|
||||||
# This Program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# This Program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
|
||||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
|
||||||
# http://www.gnu.org/copyleft/gpl.html
|
|
||||||
################################################################################
|
|
||||||
# Core (Shell) environment variables.
|
|
||||||
#
|
|
||||||
# This file contains non-OpenELEC evironment variables as well as OpenELEC
|
|
||||||
# evironment variables that are not user defined.
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# setting some Variables
|
|
||||||
if test "$FASTBOOT" = "yes"; then
|
|
||||||
IONICE="ionice -c 1 -n 0"
|
|
||||||
NICE_20="nice -n -20"
|
|
||||||
else
|
|
||||||
FASTBOOT=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
export FASTBOOT
|
|
Loading…
x
Reference in New Issue
Block a user