Skip to content

Commit

Permalink
syslinux theme updated and packaged
Browse files Browse the repository at this point in the history
  • Loading branch information
boyska authored and vinc3nt committed Dec 4, 2014
1 parent d8b43e5 commit eef9b88
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
54 changes: 54 additions & 0 deletions config/hooks/10-syslinux-customize.binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash

# This script will setup syslinux properly
# all credit goes to tails developers ;)

# Including common functions
[ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh

# Setting static variables
DESCRIPTION="$(Echo 'Theme syslinux')"
HELP=""
USAGE="${PROGRAM}"


# TODO: make it more generic (using alternatives!) so that it can be promptly
# reused by other debian-live systems

# Reading configuration files
Read_conffiles config/all config/common config/binary
Set_defaults

if [ "${LB_BOOTLOADER}" != "syslinux" ]
then
exit 0
fi

# Setting boot method specific variables
case "${LB_BINARY_IMAGES}" in
iso|iso-hybrid)
SYSLINUX_PATH="binary/isolinux"
;;
hdd|usb-hdd)
SYSLINUX_PATH="binary/syslinux"
;;
esac

Echo_message "Customize syslinux theme"
menu=chroot/usr/share/images/freepto-graphics/freepto-syslinux-menu.cfg
if [[ -f "$menu" ]]; then
cp "$menu" "${SYSLINUX_PATH}/custom-menu.cfg"
else
Echo_error "Cannot find custom menu"
exit 0
fi

img=chroot/usr/share/images/freepto-graphics/freepto-syslinux-splash.png
if [[ -f "$img" ]]; then
cp "$img" "${SYSLINUX_PATH}/custom-splash.png"
else
Echo_warning "cannot find splash image"
fi

sed -i -e 's/stdmenu\.cfg/custom-menu.cfg/' "${SYSLINUX_PATH}/menu.cfg"
sed -i -e 's/stdmenu\.cfg/custom-menu.cfg/' "${SYSLINUX_PATH}/syslinux.cfg"
Binary file removed config/includes.binary/syslinux/splash.png
Binary file not shown.

0 comments on commit eef9b88

Please sign in to comment.