XT-CUSTOMIZE-IMAGE(8)

πŸ“¦
version 4.9.2 Β· 4 versions
, in debian bookworm, ubuntu noble

πŸ’– xt-customize-image πŸ’–

okay so bestie, this is xt-customize-image from the Perl Programmers Reference Guide, section 8, and it's literally the little script that gives a freshly installed copy of GNU/Linux its whole personality ✨


🌸 NAME 🌸

xt-customize-image β€” customize a freshly installed copy of GNU/Linux πŸ§πŸ’…


✨ SYNOPSIS ✨

xt-customize-image [options]

Help Options:
 --help     Show this scripts help information.
 --manual   Read this scripts manual.
 --version  Show the version number and exit.

Debugging Options:
 --verbose  Be verbose in our execution.

Mandatory Options:
 --location The location of the new installation
 --dist     The name of the distribution which has been installed.

All other options from xen-create-image, such as the new IP address(es)
to give to the new instance, will be passed as environmental variables.

πŸ“ NOTES πŸ“

so basically, this script does NOT get run by you, it gets invoked by xen-create-image after it has created a fresh installation of Linux inside a temporary location. it's the glow-up phase, the "okay we built you, now let's make you cute" phase πŸŽ€

when it gets called, it shows up with a full copy of the arguments from xen-create-image chillin' in its environment, plus several command line arguments of its own. iykyk.

the command line arguments that are mandatory (no skipping, bestie, fr fr) are:

  • --location β€” the temporary installation root of the new install
  • --dist β€” the distribution which has been installed.

πŸͺ HOOK SCRIPTS πŸͺ

this is the part that's giving main character energy. the distribution name gets used to locate an appropriate collection of scripts β€” aka hooks β€” to execute so the actual customisation happens. ✨

each hook gets executed with a single parameter, which is the directory path to the new instance. that argument is taken straight from the --location option. no cap.

so for a distribution named foo, the scripts get loaded and executed from /usr/share/xen-tools/foo.d. and every executable in there gets loaded and executed in sorted order. periodt. πŸ’…

now here's the slay part: the systems administrator can optionally provide site-specific revisions of those same hooks by dropping them into the directory /etc/xen-tools/hooks.d/. if you do that, a script with the same name as the one in the foo.d directory above takes precedence πŸ‘‘

and the way that this is genuinely iconic is you can use it to:

  • prevent certain hooks from running at all πŸ™ˆ
  • expand hooks with site-specific features that won't get overwritten on upgrades 🫢
  • patch in critical bug-fixes before the upstream OS distribution provider even reacts 😭

πŸ‘‘ AUTHORS πŸ‘‘


πŸ“œ LICENSE πŸ“œ

Copyright (c) 2005-2009 by Steve Kemp, (c) 2010 by The Xen-Tools Development Team. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. 🧚


lowkey important: this module is free software, so go off, but the LICENSE file has the full tea on the terms. read it, bestie, fr fr.

okay that's the whole page!! version 4.9.2, dated 2023-02-06, and it's xt-customize-image(8) β€” thanks for coming to my ted talk, mwah πŸ’‹πŸ’–βœ¨

πŸ“¦ where this page comes from