Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SUMMARY = "Encrypted update.sh script for SWU generation"
- LICENSE = "CLOSED"
- FILESEXTRAPATHS_prepend := "${THISDIR}/fod-testing-image-swu:${THISDIR}/encryption:"
- SRC_URI = " file://update.sh"
- DEPENDS += " openssl-native"
- S = "${WORKDIR}"
- do_copy_script () {
- cp ${THISDIR}/fod-testing-image-swu/update.sh ${DEPLOY_DIR_IMAGE}/update.sh
- }
- do_encrypt_script () {
- aes_key=$(cut -d " " -f1 "${THISDIR}/encryption/aes-key.txt")
- aes_iv=$(cut -d " " -f2 "${THISDIR}/encryption/aes-key.txt")
- openssl enc -aes-256-cbc -in ${DEPLOY_DIR_IMAGE}/update.sh -out ${DEPLOY_DIR_IMAGE}/update.sh.enc -K "$aes_key" -iv "$aes_iv"
- }
- addtask copy_script before do_build
- addtask encrypt_script after copy_script before do_build
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement