]>
git.proxmox.com Git - pve-container.git/blob - src/PVE/LXC/Setup/Alpine.pm
1 package PVE
::LXC
::Setup
::Alpine
;
10 use PVE
::LXC
::Setup
::Base
;
11 use PVE
::LXC
::Setup
::Debian
;
13 use base
qw(PVE::LXC::Setup::Base);
16 my ($class, $conf, $rootdir) = @_;
17 my $self = { conf
=> $conf, rootdir
=> $rootdir, version
=> 0 };
18 $conf->{ostype
} = "alpine";
19 return bless $self, $class;
23 my ($self, $conf) = @_;
24 my $rootdir = $self->{rootdir
};
25 # enable networking service
26 $self->ct_symlink('/etc/init.d/networking',
27 '/etc/runlevels/boot/networking');
29 $self->ct_symlink('/etc/init.d/bootmisc',
30 '/etc/runlevels/boot/bootmisc');
31 $self->ct_symlink('/etc/init.d/hostname',
32 '/etc/runlevels/boot/hostname');
34 $self->ct_symlink('/etc/init.d/killprocs',
35 '/etc/runlevels/shutdown/killprocs');
36 $self->ct_symlink('/etc/init.d/savecache',
37 '/etc/runlevels/shutdown/savecache');
45 # Network is debian compatible, but busybox' udhcpc6 is unfinished
46 my ($self, $conf) = @_;
48 # XXX: udhcpc6 in busybox is broken; once a working alpine release comes
49 # we can remove this bit.
51 # Filter out ipv6 dhcp and turn it into 'manual' so they see what's up.
54 foreach my $k (keys %$conf) {
55 next if $k !~ m/^net(\d+)$/;
56 my $netstring = $conf->{$k};
58 my $d = PVE
::LXC
::parse_lxc_network
($netstring);
59 if (defined($d->{ip6
}) && $d->{ip6
} eq 'dhcp') {
61 $netstring = PVE
::LXC
::print_lxc_network
($d);
63 $netconf->{$k} = $netstring;
66 PVE
::LXC
::Setup
::Debian
::setup_network
($self, $netconf);