]> git.proxmox.com Git - pve-container.git/blob - src/PVE/LXC/Setup/Plugin.pm
fix #4192: revamp check for systemd version
[pve-container.git] / src / PVE / LXC / Setup / Plugin.pm
1 package PVE::LXC::Setup::Plugin;
2
3 # the abstract Plugin interface which user should restrict themself too
4
5 use strict;
6 use warnings;
7
8 use Carp;
9
10 sub new {
11 my ($class, $conf, $rootdir, $os_release) = @_;
12 croak "implement me in sub-class\n";
13 }
14
15 sub template_fixup {
16 my ($self, $conf) = @_;
17 croak "implement me in sub-class\n";
18 }
19
20 sub setup_network {
21 my ($self, $conf) = @_;
22 croak "implement me in sub-class\n";
23 }
24
25 sub set_hostname {
26 my ($self, $conf) = @_;
27 croak "implement me in sub-class\n";
28 }
29
30 sub set_dns {
31 my ($self, $conf) = @_;
32 croak "implement me in sub-class\n";
33 }
34
35 sub set_timezone {
36 my ($self, $conf) = @_;
37 croak "implement me in sub-class\n";
38 }
39
40 sub setup_init {
41 my ($self, $conf) = @_;
42 croak "implement me in sub-class\n";
43 }
44
45 sub set_user_password {
46 my ($self, $conf, $user, $opt_password) = @_;
47 croak "implement me in sub-class\n";
48 }
49
50 sub unified_cgroupv2_support {
51 my ($self, $init) = @_;
52 croak "implement me in sub-class\n";
53 }
54
55 sub ssh_host_key_types_to_generate {
56 my ($self) = @_;
57 croak "implement me in sub-class\n";
58 }
59
60 # hooks
61
62 sub pre_start_hook {
63 my ($self, $conf) = @_;
64 croak "implement me in sub-class";
65 }
66
67 sub post_clone_hook {
68 my ($self, $conf) = @_;
69 croak "implement me in sub-class";
70 }
71
72 sub post_create_hook {
73 my ($self, $conf, $root_password, $ssh_keys) = @_;
74 croak "implement me in sub-class";
75 }
76
77 1;