]> git.proxmox.com Git - pve-container.git/blob - src/PVE/LXC/Setup/Devuan.pm
close #1668: add Devuan support
[pve-container.git] / src / PVE / LXC / Setup / Devuan.pm
1 package PVE::LXC::Setup::Devuan;
2
3 use strict;
4 use warnings;
5
6 use PVE::Tools qw($IPV6RE);
7
8 use PVE::LXC::Setup::Debian;
9 use base qw(PVE::LXC::Setup::Debian);
10
11 sub 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);
17
18 die "unsupported Devuan version '$version'\n"
19 if $version !~ /jessie|ascii/;
20
21 my $self = { conf => $conf, rootdir => $rootdir, version => $version };
22
23 $conf->{ostype} = "devuan";
24
25 return bless $self, $class;
26 }
27
28 # the rest gets handled by the Debian plugin, which is compatible with older
29 # non-systemd Debian versions for now.
30
31 1;