summaryrefslogtreecommitdiffstats
path: root/scripts/config
blob: 69e83e3c29f9295ad12001eb1d364cae19ea8542 (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
#! /bin/sh
# automatically run by lh_config

BASEDIR="`dirname $0`/.."
. "${BASEDIR}/config/amnesia"
if [ -e "${BASEDIR}/config/amnesia.local" ] ; then
   . "${BASEDIR}/config/amnesia.local"
fi

RUN_LH_CONFIG="lh config noautoconfig"

# init config/ with defaults
$RUN_LH_CONFIG ${@}

# set Amnesia's general options
$RUN_LH_CONFIG \
   --apt-recommends disabled \
   --cache-stages "bootstrap rootfs" \
   --categories "main non-free" \
   --distribution lenny \
   --hostname="amnesia" \
   --iso-application="Amnesia live system" \
   --iso-publisher="https://amnesia.boum.org/" \
   --iso-volume="Amnesia ${AMNESIA_TODAY}" \
   --memtest none \
   --username="amnesia" \
   --syslinux-timeout 4 \
   ${@}

# build i386 images on amd64 as well,
# include only 686 kernel when building for i386
hw_arch="`dpkg --print-architecture`"
if [ "$hw_arch" = i386 -o "$hw_arch" = amd64 ]; then
   $RUN_LH_CONFIG \
      --architecture i386 \
      --linux-flavours 686 \
      ${@}
fi

# locale-dependent configuration
. "${BASEDIR}/config/chroot"
case "${LH_LANGUAGE}" in
   de)
      AMNESIA_APPEND="${AMNESIA_APPEND} locale=de_DE.UTF-8 keyb=de timezone=Europe/Berlin"
      ;;
   fr)
      AMNESIA_APPEND="${AMNESIA_APPEND} locale=fr_FR.UTF-8 keyb=fr timezone=Europe/Paris"
      ;;
   *)
      ;;
esac
$RUN_LH_CONFIG --bootappend-live "${AMNESIA_APPEND}" ${@}

case "${LH_LANGUAGE}" in
   de|fr)
      PACKAGES_LISTS="standard amnesia-common amnesia-${AMNESIA_BASE} amnesia-${LH_LANGUAGE}"
      ;;
   *)
      PACKAGES_LISTS="standard amnesia-common amnesia-${AMNESIA_BASE}"
      ;;
esac
$RUN_LH_CONFIG --packages-lists="$PACKAGES_LISTS" ${@}

# version
echo "${AMNESIA_TODAY}" > "${BASEDIR}/config/chroot_local-includes/etc/amnesia/version"