forked from boyska/freepto-lb
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathconfig
executable file
·119 lines (98 loc) · 2.43 KB
/
config
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/bash
#set -x
## LOAD CONFIGURATION:
if [ -r config/freepto ]
then
echo "Reading freepto configuration file...." >&2
. config/freepto
fi
if [ -n "${LB_ADDITIONAL_CONF}" ] && [ -r "${LB_ADDITIONAL_CONF}" ]; then
echo "Reading additional configuration files..." >&2
cat "${LB_ADDITIONAL_CONF}" >> config/freepto.local
fi
if [ -r config/freepto.local ]; then
echo "Reading freepto local configuration file...." >&2
. config/freepto.local
fi
if [ ! -n "$http_proxy" ]
then
proxyoption="--apt-http-proxy $http_proxy"
fi
if [ "$PERSISTENCE" -eq "0" ]
then
persistence_media="persistence-media=removable-usb"
fi
if [ -z "$LIVEBOOT_KEYMAP" ]; then
LIVEBOOT_KEYMAP="$KEYMAP"
fi
## UPDATED /ETC/FREEPTO DIRECTORY:
# build info
cat > config/includes.chroot/etc/freepto/build <<EOF
date=$BUILDING_DATE
live-build_version=$LIVE_BUILD_VERSION
git_commit=$GIT_HEAD
git_tag=$GIT_DESCRIBE
EOF
# os-version
cat > config/includes.chroot/etc/freepto/version <<EOF
release=$FREEPTO_RELEASE
codename=$FREEPTO_CODENAME
EOF
## SHOW CONFIGURATION:
cat << EOF
Used config
===========
Username $USERNAME
Linux flavours $LINUX_FLAVOURS
Locale $LOCALE
Timezone $ZONE
Keymap $KEYMAP
EOF
## RUN LB CONFIG:
lb config noauto \
-a i386 \
-b hdd \
-d wheezy \
--linux-flavours "$LINUX_FLAVOURS" \
--security true \
--mode debian \
--memtest none \
--source false \
--checksums sha256 \
--system live \
--hdd-label $HDD_LABEL \
--apt-source-archives false \
--debian-installer false \
--debian-installer-gui false \
--bootappend-install noprompt \
--mirror-bootstrap $MIRROR \
--mirror-chroot $MIRROR \
$proxyoption \
--bootappend-live "\
boot=live \
config \
noeject \
persistence-encryption=luks \
username=$USERNAME \
nottyautologin \
hostname=freepto \
user-fullname=$USERNAME \
persistence \
live-config.hooks=filesystem \
live-config.timezone='$ZONE' \
live-config.locales=$LOCALE live-config.timezone=$ZONE live-config.keyboard-layouts=${KEYMAP} live-boot.keymap=${LIVEBOOT_KEYMAP} \
$persistence_media \
" \
--archive-areas "main contrib non-free" \
--apt-recommends true
cd config/package-lists
LOCALE_PACKAGES="locale.list.chroot"
if [ -f $LOCALE_PACKAGES ]
then
rm $LOCALE_PACKAGES
fi
LINKED_LOCALE="$LOCALE"
if [ -f $LINKED_LOCALE ]
then
ln -s $LINKED_LOCALE $LOCALE_PACKAGES
fi