Op 11 okt. 2013, om 16:35 heeft Jack Mitchell <m...@communistcode.co.uk> het 
volgende geschreven:

> What is the best way to set the root password for an image during build
> time?
> 
> I have come across this snippet:
> 
> ROOTFS_POSTPROCESS_COMMAND += " \
>        sed 's%^root:[^:]*:%root:${PASSWD}:%' \
>        < ${IMAGE_ROOTFS}/etc/shadow \
>> ${IMAGE_ROOTFS}/etc/shadow.new;\
>        mv ${IMAGE_ROOTFS}/etc/shadow.new ${IMAGE_ROOTFS}/etc/shadow ;"
> 
> but it feels a bit hacky...

indeed, gnu sed has had a -i option for some years now, no needs to that 
intermediate file.
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to