rootfs.sh can clobber /sbin/init in pre-populated rootfs dir
crobinso opened this issue · 0 comments
crobinso commented
If we pre-populate a rootfs dir, and pass it to rootfs.sh like ROOTFS_DIR=mydir ./rootfs-builder/rootfs.sh
, prepare_overlay()
will unconditionally clobber /sbin/init
, even if one was previously set. Seems like this code should check first to see if an init exists, and only then try to do its symlink hackery if nothing is there.