From 12e3e6fe00bafb39197441ee8fb23bd355337efd Mon Sep 17 00:00:00 2001 From: Mika Tuupola Date: Wed, 5 Dec 2018 05:03:53 +0000 Subject: [PATCH] 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 --- rpi3-convert-stage-5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpi3-convert-stage-5.sh b/rpi3-convert-stage-5.sh index d76a190..888ca9b 100755 --- a/rpi3-convert-stage-5.sh +++ b/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