[pve-devel] [PATCH v5 container 1/4] setup: add post_clone_hook for containers

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jun 18 17:59:52 CEST 2021


On 17.06.21 12:51, Oguz Bektas wrote:
> --- a/src/PVE/LXC/Setup.pm
> +++ b/src/PVE/LXC/Setup.pm
> @@ -352,6 +352,18 @@ sub pre_start_hook {
>      $self->protected_call($code);
>  }
>  
> +sub post_clone_hook {
> +    my ($self, $conf) = @_;> +
> +    my $clone = 1;


what is with this parameter? The post_clone_hook does not have it in it's
signature and it does not look like it would be useful in general...

> +
> +    my $code = sub {
> +	$self->{plugin}->post_clone_hook($self->{conf}, $clone);

why pass $conf if then $self->{conf} is passed to the actual hook, leaving $conf
unused?

> +    };
> +    $self->protected_call($code);
> +
> +}
> +
>  sub post_create_hook {
>      my ($self, $root_password, $ssh_keys) = @_;
>  





More information about the pve-devel mailing list