mask sys-kernel-*.mount units, no use in CT by default

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-04-25 17:55:21 +02:00
parent 9cf8106382
commit 2d2bee9185
1 changed files with 11 additions and 0 deletions

View File

@ -455,6 +455,12 @@ sub cache_packages {
$self->run_command([@pacman, '-Sw', '--', @$packages]); $self->run_command([@pacman, '-Sw', '--', @$packages]);
} }
sub mask_systemd_unit {
my ($self, $unit) = @_;
my $root = $self->{rootfs};
symln '/dev/null', "$root/etc/systemd/system/$unit";
}
sub bootstrap { sub bootstrap {
my ($self, $include, $exclude) = @_; my ($self, $include, $exclude) = @_;
my $root = $self->{rootfs}; my $root = $self->{rootfs};
@ -542,6 +548,11 @@ sub bootstrap {
print "Installing packages...\n"; print "Installing packages...\n";
$self->ve_command(['pacman', '-S', '--needed', '--noconfirm', '--', @$packages]); $self->ve_command(['pacman', '-S', '--needed', '--noconfirm', '--', @$packages]);
print "Masking problematic systemd units...\n";
for my $unit (qw(sys-kernel-config.mount sys-kernel-debug.mount)) {
$self->mask_systemd_unit($unit);
}
} }
# devices needed for gnupg to function: # devices needed for gnupg to function: