Skip to content

Commit

Permalink
fix Disable boot logs error on existing file
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Nov 20, 2023
1 parent c0c2241 commit c4275b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ci/ci-debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ARG DEBIAN_CODENAME
ENV CI_RUNNING=true TERM=xterm

# create pi configs to test installation
RUN touch /boot/cmdline.txt
RUN touch /boot/config.txt
RUN echo "logo.nologo" > /boot/cmdline.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& echo "--- install packages (1) ---" \
Expand Down
4 changes: 2 additions & 2 deletions installation/routines/optimize_boot_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ _optimize_handle_boot_logs() {
echo " Disable boot logs"

if [ ! -s "${RPI_BOOT_CMDLINE_FILE}" ];then
sudo tee $RPI_BOOT_CMDLINE_FILE <<-EOF
sudo tee "${RPI_BOOT_CMDLINE_FILE}" <<-EOF
${OPTIMIZE_BOOT_CMDLINE_OPTIONS}
EOF
else
for option in $OPTIMIZE_BOOT_CMDLINE_OPTIONS
do
if ! $(grep -iw "$option" "${RPI_BOOT_CMDLINE_FILE}") ; then
if ! grep -qiw "$option" "${RPI_BOOT_CMDLINE_FILE}" ; then
sudo sed -i "s/$/ $option/" "${RPI_BOOT_CMDLINE_FILE}"
fi
done
Expand Down

0 comments on commit c4275b6

Please sign in to comment.