#!/bin/sh ## live-build(7) - System Build Scripts ## Copyright (C) 2006-2015 Daniel Baumann ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it ## under certain conditions; see COPYING for details. set -e # Including common functions [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh # Setting static variables DESCRIPTION="Installs loopback.cfg into binary" USAGE="${PROGRAM} [--force]" # Processing arguments and configuration files Init_config_data "${@}" # We avoid checking if we need to be running this bootloader # on purpose. The reason: You will always want to have # a loopback.cfg file # TODO: Add an option to be able to disable this file creation Echo_message "Begin installing loopback.cfg..." # Requiring stage file Require_stagefile .build/config .build/bootstrap # Checking stage file Check_stagefile .build/binary_loopback_cfg # Checking lock file Check_lockfile .lock # Creating lock file Create_lockfile .lock # Check architecture Check_architectures amd64 i386 Check_crossarchitectures # Variable used to embed newlines NL=" " # Local functions Grub_menu_entry() { local LABEL="$1" local KERNEL="$2" local INITRD="$3" local APPEND="$4" cat < binary/boot/grub/loopback.cfg # Creating stage file Create_stagefile .build/binary_loopback_cfg