]> git.proxmox.com Git - aab.git/commitdiff
mask sys-kernel-*.mount units, no use in CT by default
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 25 Apr 2020 15:55:21 +0000 (17:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 25 Apr 2020 15:55:21 +0000 (17:55 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/AAB.pm

index 9a9a456436e3b2cf6321908574f3d6b898ca6eae..405841be9b4a9f65d0e06daefcc9c3070e1a21c1 100644 (file)
@@ -455,6 +455,12 @@ sub cache_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 {
     my ($self, $include, $exclude) = @_;
     my $root = $self->{rootfs};
@@ -542,6 +548,11 @@ sub bootstrap {
 
     print "Installing packages...\n";
     $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: