Browse Source

Avoid duplicating the file contents

Currently if this code is run cmdline.txt will have duplicated content.
First the original line and second the original line with init_resize.sh
added.

Changelog: Avoid duplicate content in cmdline.txt

Signed-off-by: Mika Tuupola <tuupola@appelsiini.net>
1.1.x
Mika Tuupola 6 years ago
parent
commit
12e3e6fe00
  1. 2
      rpi3-convert-stage-5.sh

2
rpi3-convert-stage-5.sh

@ -103,7 +103,7 @@ install_files() {
# case it is missing, add it back to cmdline.txt
if ! grep -q "init=/usr/lib/raspi-config/init_resize.sh" ${output_dir}/cmdline.txt; then
cmdline=$(cat ${output_dir}/cmdline.txt)
sh -c -e "echo '${cmdline} init=/usr/lib/raspi-config/init_resize.sh' >> ${output_dir}/cmdline.txt";
sh -c -e "echo '${cmdline} init=/usr/lib/raspi-config/init_resize.sh' > ${output_dir}/cmdline.txt";
fi
# Update Linux kernel command arguments with our custom configuration

Loading…
Cancel
Save