Browse Source
Merge pull request #211 from drewmoseley/master
Misc changes from Reliagate Integration
revert-252-rm-only-tag-2.2.x
Mirza Krak
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
9 additions and
4 deletions
-
mender-convert-modify
-
mender-convert-package
-
modules/log.sh
|
|
@ -120,7 +120,7 @@ if [ "${MENDER_GRUB_EFI_INTEGRATION}" == "y" ]; then |
|
|
|
if [ -z "${MENDER_GRUB_INITRD_IMAGETYPE}" ]; then |
|
|
|
initrd_imagetype=$(probe_initrd_in_boot_and_root) |
|
|
|
else |
|
|
|
kernel_imagetype="${MENDER_GRUB_INITRD_IMAGETYPE}" |
|
|
|
initrd_imagetype="${MENDER_GRUB_INITRD_IMAGETYPE}" |
|
|
|
fi |
|
|
|
|
|
|
|
cat <<- EOF > work/grub-mender-grubenv-${MENDER_GRUBENV_VERSION}/mender_grubenv_defines |
|
|
|
|
|
@ -23,8 +23,8 @@ PLATFORM_PACKAGE_HOOKS=(platform_package) |
|
|
|
|
|
|
|
function trap_exit() { |
|
|
|
echo "mender-convert-package has finished. Cleaning up..." |
|
|
|
sudo umount -f work/boot > /dev/null |
|
|
|
sudo umount -f work/rootfs > /dev/null |
|
|
|
sudo umount -f work/boot > /dev/null 2>&1 || true |
|
|
|
sudo umount -f work/rootfs > /dev/null 2>&1 || true |
|
|
|
} |
|
|
|
|
|
|
|
function trap_term() { |
|
|
@ -255,6 +255,10 @@ if [ "${MENDER_COPY_BOOT_GAP}" == "y" ]; then |
|
|
|
disk_write_at_offset "${output_dir}/boot-gap.bin" "${img_path}" "1" |
|
|
|
fi |
|
|
|
|
|
|
|
# Unmount filesystem image files |
|
|
|
run_and_log_cmd "sudo umount -f work/boot" |
|
|
|
run_and_log_cmd "sudo umount -f work/rootfs" |
|
|
|
|
|
|
|
# Burn Partitions |
|
|
|
log_info "Writing boot partition image" |
|
|
|
disk_write_at_offset "${boot_part}" "${img_path}" "${boot_part_start}" |
|
|
|
|
|
@ -32,7 +32,8 @@ function log { |
|
|
|
local -r message="$2" |
|
|
|
local -r timestamp=$(date +"%Y-%m-%d %H:%M:%S") |
|
|
|
local -r script_name="$(basename "$0")" |
|
|
|
>&2 echo -e "${timestamp} [${level}] [$script_name] ${message}" | tee -a ${log_file} |
|
|
|
echo -e "${timestamp} [${level}] [$script_name] ${message}" >> ${log_file} |
|
|
|
>&2 echo -e "${timestamp} [${level}] [$script_name] ${message}" |
|
|
|
} |
|
|
|
|
|
|
|
function local_log_debug { |
|
|
|