Browse Source

Always create mender-configure symlinks.

Changelog: Always create symlinks from `/var/lib/mender-configure` to
`/data/mender-configure`. They always need to installed in a
rootfs-image prepared image, even if the software isn't, because if
the package is installed later, the links must be present or it will
act as if it is a non-rootfs image, and store the settings on the
rootfs partition, when they should be stored on the data partition.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
2.5.x
Kristian Amlie 4 years ago
parent
commit
0e8c9d1bfd
No known key found for this signature in database GPG Key ID: F464407C996AF03F
  1. 11
      configs/images/raspberrypi_raspbian_config
  2. 10
      mender-convert-modify

11
configs/images/raspberrypi_raspbian_config

@ -46,14 +46,3 @@ EOF
} }
PLATFORM_MODIFY_HOOKS+=(grow_data_partition) PLATFORM_MODIFY_HOOKS+=(grow_data_partition)
#
# Create the Mender Configure state folder in the data partition and symlink it
#
function create_mender_configure_state_folder_data_partition() {
log_info "Creating the Mender Configure state folder in the data partition"
run_and_log_cmd "sudo mkdir -p work/rootfs/data/mender-configure"
run_and_log_cmd "sudo ln -sf /data/mender-configure work/rootfs/var/lib/mender-configure"
}
PLATFORM_MODIFY_HOOKS+=(create_mender_configure_state_folder_data_partition)

10
mender-convert-modify

@ -155,11 +155,15 @@ if [ "${MENDER_ADDON_CONFIGURE_INSTALL}" = "y" ]; then
fi fi
deb_extract_package "work/deb-packages/${deb_name}" "work/rootfs/" deb_extract_package "work/deb-packages/${deb_name}" "work/rootfs/"
run_and_log_cmd "sudo mkdir -p work/rootfs/data/mender-configure"
run_and_log_cmd "sudo ln -sf /data/mender-configure work/rootfs/var/lib/mender-configure"
fi fi
# Do this unconditionally even if not installing mender-configure. The reason is
# that if the Debian package is installed later, this folder has to preexist. It
# is part of the rootfs setup, independently of the software.
log_info "Creating the Mender Configure state folder in the data partition"
run_and_log_cmd "sudo mkdir -p work/rootfs/data/mender-configure"
run_and_log_cmd "sudo ln -sf /data/mender-configure work/rootfs/var/lib/mender-configure"
if [ "${MENDER_GRUB_EFI_INTEGRATION}" == "y" ]; then if [ "${MENDER_GRUB_EFI_INTEGRATION}" == "y" ]; then
# Check for known U-Boot problems in all files on the boot partition. # Check for known U-Boot problems in all files on the boot partition.
check_for_broken_uboot_uefi_support work/boot check_for_broken_uboot_uefi_support work/boot

Loading…
Cancel
Save