ArmbianEnv.txt file cleanup. Without LF parameters can be added to the same line and board might not boot at all. This should fix the problem.
This commit is contained in:
parent
3326ccc116
commit
802c7be55f
8
packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization
Executable file → Normal file
8
packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization
Executable file → Normal file
@ -48,7 +48,7 @@ prepare_board() {
|
||||
sed -i "s/log\//log.hdd\//" /etc/logrotate.conf
|
||||
else
|
||||
for ConfigFile in /etc/logrotate.d/* ; do sed -i -e "s/\/log.hdd\//\/log\//" "${ConfigFile}"; done
|
||||
sed -i "s/\/log.hdd\//\/log\//" /etc/logrotate.conf
|
||||
sed -i "s/\/log.hdd\//\/log\//" /etc/logrotate.conf
|
||||
fi
|
||||
|
||||
# enable compression where not exists
|
||||
@ -241,6 +241,12 @@ add_usb_storage_quirks() {
|
||||
# check for /boot/armbianEnv.txt existence
|
||||
[ -f /boot/armbianEnv.txt ] || return
|
||||
|
||||
# cleanup. add LF. This prevents adding parameters to the same line
|
||||
echo "" >> /boot/armbianEnv.txt; sed -ie '/^$/d;$G' /boot/armbianEnv.txt; sed -ie '/^$/d;$G' /boot/armbianEnv.txt
|
||||
|
||||
# cleanup. remove empty lines in the middle
|
||||
sed -i '/^$/d' /boot/armbianEnv.txt
|
||||
|
||||
# preserve old contents if existent
|
||||
TMPFILE=$(mktemp /tmp/${0##*/}.XXXXXX)
|
||||
trap "sleep 1 ; rm \"${TMPFILE}\" ; exit 0" 0 1 2 3 15
|
||||
|
||||
Loading…
Reference in New Issue
Block a user