use PVE::LXC::Setup::ArchLinux;
use PVE::LXC::Setup::Alpine;
use PVE::LXC::Setup::Gentoo;
+use PVE::LXC::Setup::Devuan;
my $plugins = {
debian => 'PVE::LXC::Setup::Debian',
+ devuan => 'PVE::LXC::Setup::Devuan',
ubuntu => 'PVE::LXC::Setup::Ubuntu',
centos => 'PVE::LXC::Setup::CentOS',
fedora => 'PVE::LXC::Setup::Fedora',
if (-f "$rootdir/etc/debian_version") {
return "debian";
+ } elsif (-f "$rootdir/etc/devuan_version") {
+ return "devuan";
} elsif (-f "$rootdir/etc/SuSE-brand" || -f "$rootdir/etc/SuSE-release") {
return "opensuse";
} elsif (-f "$rootdir/etc/fedora-release") {
--- /dev/null
+package PVE::LXC::Setup::Devuan;
+
+use strict;
+use warnings;
+
+use PVE::Tools qw($IPV6RE);
+
+use PVE::LXC::Setup::Debian;
+use base qw(PVE::LXC::Setup::Debian);
+
+sub new {
+ my ($class, $conf, $rootdir) = @_;
+
+ my $version = PVE::Tools::file_read_firstline("$rootdir/etc/devuan_version");
+
+ die "unable to read version info\n" if !defined($version);
+
+ die "unsupported Devuan version '$version'\n"
+ if $version !~ /jessie|ascii/;
+
+ my $self = { conf => $conf, rootdir => $rootdir, version => $version };
+
+ $conf->{ostype} = "devuan";
+
+ return bless $self, $class;
+}
+
+# the rest gets handled by the Debian plugin, which is compatible with older
+# non-systemd Debian versions for now.
+
+1;
-SOURCES=Base.pm Debian.pm Ubuntu.pm CentOS.pm Fedora.pm SUSE.pm ArchLinux.pm Alpine.pm Gentoo.pm
+SOURCES=Base.pm Debian.pm Ubuntu.pm CentOS.pm Fedora.pm SUSE.pm ArchLinux.pm Alpine.pm Gentoo.pm Devuan.pm
.PHONY: install
install:
--- /dev/null
+hostname: test1
+net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=1.2.3.1
+net1: bridge=vmbr0,name=eth1,ip=10.2.3.4/24
+net2: bridge=vmbr0,name=eth2,ip=manual
--- /dev/null
+# --- BEGIN PVE ---
+127.0.0.1 localhost.localnet localhost
+::1 localhost.localnet localhost
+1.2.3.4 test1.proxmox.com test1
+# --- END PVE ---
--- /dev/null
+auto lo
+iface lo inet loopback
+iface lo inet6 loopback
+
+auto eth0
+iface eth0 inet static
+ address 1.2.3.4
+ netmask 255.255.255.0
+ gateway 1.2.3.1
+
+auto eth1
+iface eth1 inet static
+ address 10.2.3.4
+ netmask 255.255.255.0
+
+auto eth2
+iface eth2 inet manual
+
--- /dev/null
+PRETTY_NAME="Devuan GNU/Linux 1 (jessie)"
+NAME="Devuan GNU/Linux"
+VERSION_ID="1"
+VERSION="1 (jessie)"
+ID=devuan
+HOME_URL="http://www.devuan.org/"
+SUPPORT_URL="http://www.devuan.org/support/"
+BUG_REPORT_URL="https://bugs.devuan.org/"
\ No newline at end of file
--- /dev/null
+# --- BEGIN PVE ---
+ssh-rsa ABCDEFG ABC@DEF
+# --- END PVE ---
--- /dev/null
+arch: i386
+cpulimit: 1
+memory: 512
+swap: 512
+ostype: devuan
+hostname: CT102
+nameserver: 8.8.8.8,8.8.8.9
+searchdomain: proxmox.com
+net0: bridge=vmbr0,name=eth0,hwaddr=2A:31:01:D5:A4:BF,ip=192.168.3.102/20,gw=192.168.2.1
--- /dev/null
+127.0.0.1 localhost.localdomain localhost
+127.0.1.1 CT102
--- /dev/null
+127.0.0.1 localhost.localdomain localhost
+127.0.1.1 CT102
+# --- BEGIN PVE ---
+::1 localhost.localnet localhost
+192.168.3.102 CT102.proxmox.com CT102
+# --- END PVE ---
--- /dev/null
+auto lo
+iface lo inet loopback
--- /dev/null
+auto lo
+iface lo inet loopback
+
+auto eth0
+iface eth0 inet static
+ address 192.168.3.102
+ netmask 255.255.240.0
+ gateway 192.168.2.1
+
--- /dev/null
+# Existing data
+# Will be kept because there's a PVE section to be replaced
+
+# --- BEGIN PVE ---
+# Stuff gets filled here
+# --- END PVE ---
+
+# This will be kept, too
--- /dev/null
+# Existing data
+# Will be kept because there's a PVE section to be replaced
+
+# --- BEGIN PVE ---
+search proxmox.com
+nameserver 8.8.8.8
+nameserver 8.8.8.9
+# --- END PVE ---
+
+# This will be kept, too
--- /dev/null
+# --- BEGIN PVE ---
+ssh-rsa ABCDEFG ABC@DEF
+# --- END PVE ---