XT-CUSTOMIZE-IMAGE(8)
π 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 π
- Steve Kemp, https://steve.fi/
- Axel Beckert, https://axel.beckert.ch/
- Stephane Jourdois
π 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
- debian bookworm: xen-tools 4.9.2-1
- ubuntu noble: xen-tools 4.9.2-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms