danielhilst

myimage.class

Sep 24th, 2015
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. IMAGE_FEATURES += "splash package-management x11-base ssh-server-openssh hwcodecs"
  2. LICENSE = "MIT"
  3. inherit core-image
  4.  
  5. ROOT_PASSWD ?= "r00t"
  6. set_root_password () {
  7. local p=$(openssl passwd -1 -salt "As salty as the Dead Sea" "${ROOT_PASSWD}")
  8. sed -e "s/root:[^:]*:/root:${p}:/" -i ${IMAGE_ROOTFS}/etc/shadow
  9. }
  10. # EXPORT_FUNCTIONS set_root_password
  11. ROOTFS_POSTPROCESS_COMMAND += "set_root_password; "
Advertisement
Add Comment
Please, Sign In to add comment