mirror of
https://git.proxmox.com/git/dab
synced 2025-10-05 16:42:28 +00:00
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 <t.lamprecht@proxmox.com>
This commit is contained in:
parent
a4fd2e2b84
commit
d2e70cf306
@ -1288,6 +1288,11 @@ sub bootstrap {
|
||||
my $required;
|
||||
my $standard;
|
||||
|
||||
# some releases do not have the init metapackage in the rquired set anymore, but DAB assumes
|
||||
# that, so explicitly add systemd-sysv, which provides the /sbin/init symlink to systemd.
|
||||
my $add_systemd_sysv_as_required = $suiteinfo->{flags}->{systemd};
|
||||
push @$required, 'systemd-sysv' if $add_systemd_sysv_as_required;
|
||||
|
||||
my $mta = $opts->{exim} ? 'exim' : 'postfix';
|
||||
if ($mta eq 'postfix') {
|
||||
push @$important, "postfix";
|
||||
|
Loading…
Reference in New Issue
Block a user