Merge remote-tracking branch 'flapflap/de-network_configuration'
[tails-test.git] / config / binary_local-hooks / 30-syslinux_fixup
blobc71bc88f61f13b9187c53066d13d9e52a605ce93
1 #!/bin/bash
3 set -e
5 # Including common functions
6 . "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
8 # Setting static variables
9 DESCRIPTION="$(Echo 'fixing syslinux installation')"
10 HELP=""
11 USAGE="${PROGRAM}"
13 # Reading configuration files
14 Read_conffiles config/all config/bootstrap config/common config/binary
15 Set_defaults
17 # Safeguards
18 [ "${LB_BOOTLOADER}" = "syslinux" ] || exit 0
19 [ "${LB_ARCHITECTURE}" = "i386" ] || exit 0
21 # Seems like we'll have work to do
22 Echo_message "fixing syslinux installation"
24 # Setting boot method specific variables
25 case "${LB_BINARY_IMAGES}" in
26 iso|iso-hybrid)
27 SYSLINUX_PATH="binary/isolinux"
29 usb-hdd)
30 SYSLINUX_PATH="binary/syslinux"
32 esac
34 # Main
35 for module in ldlinux libcom32 libutil
37 cp chroot/usr/lib/syslinux/modules/bios/"${module}.c32" "$SYSLINUX_PATH"
38 done