Browse Source

configs: rpi3: only remove resize script/link if they exist

On some RPi3 images, e.g Ubuntu Server there is no resize init script,
and these commands would fail trying to convert such an image.

This can also be useful on Raspbian images, if they have been booted
once before they are converted using "mender-convert"

Changelog: None

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
2.0.x
Mirza Krak 5 years ago
parent
commit
372250b54b
  1. 4
      configs/raspberrypi_config

4
configs/raspberrypi_config

@ -62,6 +62,8 @@ function platform_modify() {
run_and_log_cmd "sudo ln -fs /sbin/fw_printenv work/rootfs/sbin/fw_setenv"
# Remove original 'resize2fs_once' script and its symbolic link.
if [ -L work/rootfs/etc/rc3.d/S01resize2fs_once ]; then
run_and_log_cmd "sudo unlink work/rootfs/etc/rc3.d/S01resize2fs_once"
run_and_log_cmd "sudo rm work/rootfs/etc/init.d/resize2fs_once"
fi
run_and_log_cmd "sudo rm -f work/rootfs/etc/init.d/resize2fs_once"
}

Loading…
Cancel
Save