summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot
blob: 65c5e659fc003e5168c6583e72fd8a821a31014f (plain)
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
70
71
72
73
74
75
76
77
78
#!/bin/sh

# lh_chroot(1) - customize the Debian system
# Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.

set -e

# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/live-helper.sh

# Setting static variables
DESCRIPTION="$(Echo 'customize the Debian system')"
HELP=""
USAGE="${PROGRAM} [--force]"

Arguments "${@}"

# Reading configuration files
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults

# Setup cleanup function
Setup_cleanup

# Configuring chroot
lh chroot_cache restore ${*}
lh chroot_devpts install ${*}
lh chroot_proc install ${*}
lh chroot_selinuxfs install ${*}
lh chroot_sysfs install ${*}
lh chroot_debianchroot install ${*}
lh chroot_dpkg install ${*}
lh chroot_sysv-rc install ${*}
lh chroot_hosts install ${*}
lh chroot_resolv install ${*}
lh chroot_hostname install ${*}
lh chroot_apt install ${*}
lh chroot_sources install ${*}
lh chroot_linux-image install ${*}

# Customizing chroot
lh chroot_preseed ${*}
lh chroot_local-preseed ${*}
lh chroot_tasks ${*}
lh chroot_packageslists ${*}
lh chroot_local-packageslists ${*}
lh chroot_packages ${*}
lh chroot_local-packages ${*}
lh chroot_install-packages ${*}
lh chroot_localization ${*}
lh chroot_local-includes ${*}
lh chroot_local-patches ${*}
lh chroot_sysvinit ${*}
lh chroot_local-hooks ${*}
lh chroot_hooks ${*}
lh chroot_symlinks ${*}
lh chroot_hacks ${*}
lh chroot_interactive ${*}

# Deconfiguring chroot
lh chroot_linux-image remove ${*}
lh chroot_sources remove ${*}
lh chroot_apt remove ${*}
lh chroot_hostname remove ${*}
lh chroot_resolv remove ${*}
lh chroot_hosts remove ${*}
lh chroot_sysv-rc remove ${*}
lh chroot_dpkg remove ${*}
lh chroot_debianchroot remove ${*}
lh chroot_sysfs remove ${*}
lh chroot_selinuxfs remove ${*}
lh chroot_proc remove ${*}
lh chroot_devpts remove ${*}
lh chroot_cache save ${*}