[pve-devel] [PATCH v3 container 1/2] setup: clear /etc/machine-id for newly created containers
Oguz Bektas
o.bektas at proxmox.com
Thu Jun 10 14:04:33 CEST 2021
hi,
> +sub clear_machine_id {
> > + my ($self, $conf, $clone) = @_;
> > +
> > + my $code = sub {
> > + $self->{plugin}->clear_machine_id($self->{conf}, $clone);
> > + };
> > + $self->protected_call($code);
> > +
> > +}
>
> maybe it would make more sense to call this "post_clone_hook", so it is
> re-usable for other, similar changes (like optionally regenerating SSH
> keys, or ...) in the future without polluting the entry-point namespace
> too much?
yes i was also thinking why we don't have a post_clone_hook :D
i'll change that accordingly :)
>
> > +
> > sub post_create_hook {
> > my ($self, $root_password, $ssh_keys) = @_;
> >
> > diff --git a/src/PVE/LXC/Setup/Base.pm b/src/PVE/LXC/Setup/Base.pm
> > index d73335b..21074b7 100644
> > --- a/src/PVE/LXC/Setup/Base.pm
> > +++ b/src/PVE/LXC/Setup/Base.pm
> > @@ -476,6 +476,30 @@ sub set_timezone {
> > }
> > }
More information about the pve-devel
mailing list