summaryrefslogtreecommitdiffstats
path: root/scripts/config
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/config')
-rwxr-xr-xscripts/config65
1 files changed, 65 insertions, 0 deletions
diff --git a/scripts/config b/scripts/config
new file mode 100755
index 0000000..69e83e3
--- /dev/null
+++ b/scripts/config
@@ -0,0 +1,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"