initscripts-swupdate-usb: Mark init with update alternatives
When using busybox init as main image's init system, postinsts for
busybox fails in swupdate-image because it tries to create link for
/sbin/init but it cant't because /sbin/init is already created by this
recipe but is not marked update alternative and build fails obscurely
ERROR: swupdate-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.
but the real error is inside log.do_rootfs
pdate-alternatives: Error: not linking /mnt/b/yoe/build/tmp/work/raspberrypi4_64-yoe-linux-musl/swupdate-image/1.0-r0/rootfs/sbin/init to /bin/busybox.nosuid since /mnt/b/yoe/build/tmp/work/raspberrypi4_64-yoe-linux-musl/swupdate-image/1.0-r0/rootfs/sbin/init exists and is not a link
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>