[FIRSTBOOT] allow overwrite of logs & increase min unall. SDsize

This commit is contained in:
Apaczer
2023-11-13 14:04:50 +01:00
parent a558a481e9
commit 267973cf1d
2 changed files with 4 additions and 5 deletions

View File

@@ -540,7 +540,7 @@ if (dialog --clear --stdout --ok-label YES --cancel-label NO --title " AUTO-RE
SD_MAX_AVAIL_SIZE_IN_GBx10=$(echo "$SD_MAX_AVAIL_SIZE_IN_GB" | tr -d ".") SD_MAX_AVAIL_SIZE_IN_GBx10=$(echo "$SD_MAX_AVAIL_SIZE_IN_GB" | tr -d ".")
P4_SIZE_IN_GBx10=$(echo "$P4_SIZE_IN_GB" | tr -d ".") P4_SIZE_IN_GBx10=$(echo "$P4_SIZE_IN_GB" | tr -d ".")
#Sanity checks if we don't down- or over-resize partition: #Sanity checks if we don't down- or over-resize partition:
if (test "$P4_SIZE_IN_GBx10" -ge "$SD_MAX_AVAIL_SIZE_IN_GBx10" || test "$SD_MAX_UNALL_SIZE_IN_MiB" -le 0); then if (test "$P4_SIZE_IN_GBx10" -ge "$SD_MAX_AVAIL_SIZE_IN_GBx10" || test "$SD_MAX_UNALL_SIZE_IN_MiB" -le 15); then
echo "Your MAIN partition is greater than available space for resizing or you lack unallocated sectors space" | tee -a ${LOG} echo "Your MAIN partition is greater than available space for resizing or you lack unallocated sectors space" | tee -a ${LOG}
sleep 1.5 sleep 1.5
RESIZE_ABORT=true RESIZE_ABORT=true
@@ -612,5 +612,5 @@ if ($CONSOLE_OVERWRITE || $RESIZE_COMMENCED || test -r "${BASEDIR}/firstboot.cus
safe_reboot_func safe_reboot_func
else else
#just grep logs from temp directory before continuing #just grep logs from temp directory before continuing
mv ${LOG} ${HOME}/log_firstboot.txt yes | mv ${LOG} ${HOME}/log_firstboot.txt
fi fi

View File

@@ -40,8 +40,7 @@ params=`cat ${BOOTDIR}/uEnv.txt |grep -a "CONSOLE_PARAMETERS" | cut -d "=" -f 2-
BACKLIGHT=$(cat ${HOME}/.backlight.conf) BACKLIGHT=$(cat ${HOME}/.backlight.conf)
# TVout scripting backend # TVout scripting backend
tvout=`cat ${HOME}/tvout` if test -r "${HOME}/tvout"; then
if ((test -r "${HOME}/tvout")); then
echo 0 > /sys/class/backlight/backlight/brightness echo 0 > /sys/class/backlight/backlight/brightness
echo 0 > /sys/class/vtconsole/vtcon1/bind echo 0 > /sys/class/vtconsole/vtcon1/bind
if test $BACKLIGHT -ne 0; then if test $BACKLIGHT -ne 0; then
@@ -122,7 +121,7 @@ fi
if test "x${DEBUG_MSG}" == "xyes"; then if test "x${DEBUG_MSG}" == "xyes"; then
sleep 1 sleep 1
dmesg > ${HOME}/dmesg.txt dmesg > ${HOME}/dmesg.txt
mv ${LOGS} ${HOME}/log.txt yes | mv ${LOGS} ${HOME}/log.txt
fi fi
while [ 1 ] while [ 1 ]