]> git.proxmox.com Git - pve-container.git/blame - src/PVE/LXC/Setup/Devuan.pm
d/copyright: update years
[pve-container.git] / src / PVE / LXC / Setup / Devuan.pm
CommitLineData
151c5b73
TL
1package PVE::LXC::Setup::Devuan;
2
3use strict;
4use warnings;
5
6use PVE::Tools qw($IPV6RE);
7
8use PVE::LXC::Setup::Debian;
9use base qw(PVE::LXC::Setup::Debian);
10
11sub new {
12 my ($class, $conf, $rootdir) = @_;
13
14 my $version = PVE::Tools::file_read_firstline("$rootdir/etc/devuan_version");
15
16 die "unable to read version info\n" if !defined($version);
3d27198e 17 $version = lc($version);
151c5b73 18
7f910f27
TL
19 # map to Debian version, we sometimes check that
20 my $version_map = {
21 'jessie' => 8, # Devuan 1.0
22 'ascii' => 9, # Devuan 2.0
23 'ascii/ceres' => 9,
24 'beowulf' => 10, # Devuan 3.0
25 'beowulf/ceres' => 10,
26 'chimaera' => 11, # Devuan 4.0
27 'chimaera/ceres' => 11,
1dc2d140
TL
28 'daedalus' => 12,
29 'daedalus/ceres' => 12,
db37c91c
TL
30 'excalibur' => 13,
31 'excalibur/ceres' => 13,
7f910f27
TL
32 };
33 die "unsupported Devuan version '$version'\n" if !exists($version_map->{$version});
34
35 my $self = {
36 conf => $conf,
37 rootdir => $rootdir,
38 version => $version_map->{$version},
39 devuan_version => $version,
40 };
151c5b73
TL
41
42 $conf->{ostype} = "devuan";
43
44 return bless $self, $class;
45}
46
766ffcc9
SI
47# non systemd based containers work with pure cgroupv2
48sub unified_cgroupv2_support {
917f7ae3 49 my ($self, $init) = @_;
766ffcc9
SI
50
51 return 1;
52}
53
151c5b73
TL
54# the rest gets handled by the Debian plugin, which is compatible with older
55# non-systemd Debian versions for now.
56
571;