Advertisement
Guest User

Untitled

a guest
Jan 11th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. SUMMARY = "Encrypted update.sh script for SWU generation"
  2. LICENSE = "CLOSED"
  3.  
  4. FILESEXTRAPATHS_prepend := "${THISDIR}/fod-testing-image-swu:${THISDIR}/encryption:"
  5.  
  6. SRC_URI = " file://update.sh"
  7.  
  8. inherit deploy
  9.  
  10. DEPENDS += " openssl-native"
  11.  
  12. S = "${WORKDIR}"
  13.  
  14. do_deploy () {
  15. aes_key=$(cut -d " " -f1 "${THISDIR}/encryption/aes-key.txt")
  16. aes_iv=$(cut -d " " -f2 "${THISDIR}/encryption/aes-key.txt")
  17.  
  18. openssl enc -aes-256-cbc -in ${DEPLOY_DIR_IMAGE}/update.sh -out ${DEPLOY_DIR_IMAGE}/update.sh.enc -K "$aes_key" -iv "$aes_iv"
  19. }
  20.  
  21. addtask deploy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement