support hooks directly in preseed file

Bug #1202440 reported by Jeremy Kitchen on 2013-07-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debian-installer (Ubuntu)
Wishlist
Unassigned

Bug Description

It would be great to be able to define hooks directly in the preseed file:

d-i hook/post-base-installer/0 string "in-target adduser foo"

Something like that.

The use case I have for this is such:
I'm building a preseed file to bootstrap a system up to installing puppet and running it. The problem is, I need my puppet uid/gid to be consistent every time. For other users, I just add them to my puppet configuration so when puppet runs the user is created with the appropriate uid, but in order to do that I need to install puppet which will install its own user (with its own, possibly inconsistent) uid.

Therefore I need to create the user/group prior to installing puppet. When I asked about doing this on #ubuntu-installer, the response I got from cjwatson (thanks, by the way!) was to use preseed/early_install to add a hook to /usr/lib/post-base-installer.d/ to call "in-target adduser foo". Since there can only be one early_install, having to add this to a potentially long and complex chain of commands could get pretty hairy, so being able to do:

d-i hook/post-base-installer/00_add_foo_user string "in-target adduser foo"

Would be much much cleaner and also allow for defining multiple hooks, so if you're generating your preseed file with a script it should make it easier to manage multiple parts of your script adding their own hooks.

I'm a pretty new user of preseed, so I can't come up with more use cases, but I can't imagine it would be that hard to add this functionality, and I think it could be incredibly useful.

Triaged/Wishlist: there is some merit to the idea of things being easier to customize, and to better control exactly when a hook gets fired.

The development of debian-installer happens on Debian, perhaps you could open a bug there or check if there is already one, since I'm sure it would benefit there as well.

Changed in debian-installer (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers