bootstrap: die if init binary could not get diverted
This is a safe guard check, as otherwise DAB might end up putting the
wrong 'init' executable in the final image, like it happened for
Ubuntu 24.04 before the fixing commit d2e70cf ("explicitly add
systemd-syv to required packages for systemd based releases").
Signed-off-by: Thomas Lamprecht <email address hidden>
explicitly add systemd-syv to required packages for systemd based releases
This fixes template creations for some newer releases that do not have
the `init` meta package as "required" priority anymore, like Ubuntu
24.04.
Without that the /sbin/init did not exist after unpacking the required
packages, which broke DABs assumption it holds when creating a
diversion for the PID 1 init for bootstrap setup.
The order of events went as follows:
1. extract required packages
2. rename init to init.org (but no init exists at this point)
3. copy fake init to init (that works)
4. unpack required packages
5. rename init.org to init (doesn't work, since 2 failed)
6. divert init (still fake init!) to init.distrib
7. copy fake init (again) to init
8. .. install, including now really installing systemd-sysv which
overwrites init
9. remove divert, copying back fake init to init
So, in the end the CT image shipped the very basic DAB init, which was
only intended to be used for during the appliance building process.
Fix this by explicitly adding `systemd-sysv` as required package for
all distros and releases using systemd.
Signed-off-by: Thomas Lamprecht <email address hidden>