Re: Common pre-imaging scripts in Debian
On 03/27/2017 05:19 PM, Sam Morris wrote:
> On Mon, 2017-03-27 at 08:25 +0200, Michael Stapelberg wrote:
>> Thanks for the hint. I think it would make sense to fix this in
>> vmdebootstrap itself, because it isn’t a Raspberry Pi-specific issue.
> It seems that every image-building tool has to re-implement the process
> of removing SSH host keys, /etc/machine-id, /var/lib/dbus/machine-id
> and so on before the image is actually created.
> What do you think of a more general approach to allow packages
> themselves to participate in the process of preparing a system for
> This could be a simple as having image-builders execute "run-parts
> /usr/lib/preimage", that directory being populated by participating
> packages; or a new "preimage" maintainer script, and a "dpkg-preimage"
> command that invokes the preimage scripts for all installed packages.
Good idea. If one was to implement it, I'd use it for the OpenStack images.