File: plugins

package info (click to toggle)
ltsp 0.99debian11
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 976 kB
  • ctags: 103
  • sloc: sh: 1,320; python: 485; ansic: 436; lex: 152; makefile: 129; yacc: 58
file content (69 lines) | stat: -rw-r--r-- 2,561 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
the plugins system for ltsp-build-client:

plugins are called by the "load_plugins" function. common plugins are located
in /usr/share/ltsp/plugins/ltsp-build-client/common, while vendor-specific
plugins are defined in /usr/share/ltsp/plugins/ltsp-build-client/VENDOR. if a
vendor plugin has the same filename as a common plugin, it will override the
common plugin. optionally, the admin can override common or vendor plugins in
/etc/ltsp/plugins/ltsp-build-client. 

for starting a new VENDOR implementation, focus on the configure, install,
after-install, and finalization phases at first.

each plugin should be written in such a way as the code is only executed in the
appropriate phase, such as wrapping the code in case statements.

NOTE:  Plugins are "sourced" not "executed", so be careful to avoid such things
as "exit" in your plugin scripts

there are several modes in which these plugins are called:

commandline:

builds the list of commandline arguments supported by the loaded plugins


configure:

sets variables for commandline options that are set

we recommend putting very early in your DISTRO plugin dir a plugin such as
000-basic-configuration that detects and defines some appropriate variables for
your distro- like which particular version of the distro you are running,
default lists of packages or package sets to install, default package mirror to
use, etc.


before-install:

before the initial chroot is built


install:

where the initial chroot is built

in the install phase, you want to essentially bootstrap a basic chroot of your
distro. on Debian, this is done with the debootstrap tool. this will obviously
vary greatly for each distro.


after-install:

additional package installation(ltsp-client), tweaks, etc.

in the after-install phase, you may want to add additional packages that might
be difficult to include as part of the initial bootstrapping of the chroot, if
the bootstrap tools don't support proper dependency resolution (i.e.
debootstrap). you may want to add certain configuration tweaks to certain
packages at this point as well, such as configuring an initramfs generator so
it will support NFS root.


finalization:

in the finalization phase, you may want to install additional packages that
needed custom configurations to other software before installing, such as a
kernel (which may require certain initramfs tweaks). you may also want to copy
the kernel images into a location accessible by tftp at this phase, or seed the
chroot's /etc/ssh/ssh_known_hosts file with your server's public ssh keys.