]>
git.proxmox.com Git - pve-container.git/blob - src/PVE/LXC/Setup/ArchLinux.pm
1 package PVE
::LXC
::Setup
::ArchLinux
;
6 use File
::Path
'make_path';
8 use PVE
::LXC
::Setup
::Base
;
10 use base
qw(PVE::LXC::Setup::Base);
13 my ($class, $conf, $rootdir) = @_;
15 # /etc/arch-release exists, but it's empty
16 #my $release = PVE::Tools::file_read_firstline("$rootdir/etc/arch-release");
17 #die "unable to read version info\n" if !defined($release);
19 my $self = { conf
=> $conf, rootdir
=> $rootdir, version
=> 0 };
21 $conf->{ostype
} = "archlinux";
23 return bless $self, $class;
27 my ($self, $conf) = @_;
28 # ArchLinux doesn't come with any particular predefined and enabled
29 # networking, so it probably makes sense to do the equivalent of
30 # 'systemctl enable systemd-networkd', since that's what we're configuring
33 # systemctl enable systemd-networkd
34 $self->ct_mkdir('/etc/systemd/system/multi-user.target.wants');
35 $self->ct_mkdir('/etc/systemd/system/socket.target.wants');
36 $self->ct_symlink('/usr/lib/systemd/system/systemd-networkd.service',
37 '/etc/systemd/system/multi-user.target.wants/systemd-networkd.service');
38 $self->ct_symlink('/usr/lib/systemd/system/systemd-networkd.socket',
39 '/etc/systemd/system/socket.target.wants/systemd-networkd.socket');
41 # edit /etc/securetty (enable login on console)
42 $self->setup_securetty($conf, qw(lxc/console lxc/tty1 lxc/tty2 lxc/tty3 lxc/tty4));
46 my ($self, $conf) = @_;
47 $self->setup_container_getty_service();
51 my ($self, $conf) = @_;
53 $self->setup_systemd_networkd($conf);