diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:47 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:28 +0100 |
commit | 677415f6d7efc1e5b888570d70af311d2900c69c (patch) | |
tree | 32fe7ced768666c229fff913fe12cbbf2fdd34e4 /helpers/lh_binary_syslinux | |
parent | 811ff0532fcb3305ebefcd1d61e4eb6c260902eb (diff) | |
download | vyos-live-build-677415f6d7efc1e5b888570d70af311d2900c69c.tar.gz vyos-live-build-677415f6d7efc1e5b888570d70af311d2900c69c.zip |
Adding live-helper 1.0~a2-1.
Diffstat (limited to 'helpers/lh_binary_syslinux')
-rwxr-xr-x | helpers/lh_binary_syslinux | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux index 5384232d6..d80d66eba 100755 --- a/helpers/lh_binary_syslinux +++ b/helpers/lh_binary_syslinux @@ -17,16 +17,16 @@ Read_conffile config/image Set_defaults # Requiring stage file -Require_stagefile "${LIVE_ROOT}"/.stage/bootstrap +Require_stagefile .stage/bootstrap # Checking lock file -Check_lockfile "${LIVE_ROOT}"/.lock +Check_lockfile .lock # Creating lock file -Create_lockfile "${LIVE_ROOT}"/.lock +Create_lockfile .lock # Checking stage file -Check_stagefile "${LIVE_ROOT}"/.stage/binary_syslinux +Check_stagefile .stage/binary_syslinux if [ "${LIVE_ARCHITECTURE}" != "amd64" ] && [ "${LIVE_ARCHITECTURE}" != "i386" ] then @@ -36,7 +36,7 @@ fi if [ "${LIVE_SYSLINUX}" = "enabled" ] then - if [ ! -f "${LIVE_CHROOT}"/usr/bin/syslinux ] + if [ ! -f chroot/usr/bin/syslinux ] then PACKAGES="${PACKAGES} syslinux" fi @@ -45,7 +45,7 @@ then then # Installing symlinks case "${LH_APT}" in - apt) + apt|apt-get) Chroot "apt-get install --yes ${PACKAGES}" ;; @@ -63,73 +63,73 @@ then case "${LIVE_BINARY_IMAGE}" in iso) # Copying syslinux - mkdir -p "${LIVE_ROOT}"/binary/isolinux - cp "${LIVE_CHROOT}"/usr/lib/syslinux/isolinux.bin "${LIVE_ROOT}"/binary/isolinux - cp -r "${LIVE_TEMPLATES}"/syslinux/* "${LIVE_ROOT}"/binary/isolinux + mkdir -p binary/isolinux + cp chroot/usr/lib/syslinux/isolinux.bin binary/isolinux + cp -r "${LIVE_TEMPLATES}"/syslinux/* binary/isolinux # Copying splash screen if [ -n "${LIVE_SYSLINUX_SPLASH}" ] then - cp "${LIVE_SYSLINUX_SPLASH}" "${LIVE_ROOT}/binary/isolinux/splash.rle" + cp "${LIVE_SYSLINUX_SPLASH}" binary/isolinux/splash.rle fi # Configure syslinux templates - sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg - sed -i -e "s/LIVE_DATE/${DATE}/" "${LIVE_ROOT}"/binary/isolinux/f1.txt - sed -i -e "s/LIVE_VERSION/${VERSION}/" "${LIVE_ROOT}"/binary/isolinux/f10.txt + sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/isolinux/isolinux.cfg + sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" binary/isolinux/f1.txt + sed -i -e "s/LIVE_VERSION/${VERSION}/" binary/isolinux/f10.txt # Remove unused files - rm -f "${LIVE_ROOT}"/binary/isolinux/pxelinux.cfg + rm -f binary/isolinux/pxelinux.cfg ;; net) # Copying syslinux - mkdir -p "${LIVE_ROOT}"/tftpboot - cp "${LIVE_CHROOT}"/usr/lib/syslinux/pxelinux.0 "${LIVE_ROOT}"/tftpboot + mkdir -p tftpboot + cp chroot/usr/lib/syslinux/pxelinux.0 tftpboot # Install syslinux templates - mkdir -p "${LIVE_ROOT}"/tftpboot/pxelinux.cfg - cp -r "${LIVE_TEMPLATES}"/syslinux/* "${LIVE_ROOT}"/tftpboot/pxelinux.cfg - mv "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/pxelinux.cfg "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default - sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.txt + mkdir -p tftpboot/pxelinux.cfg + cp -r "${LIVE_TEMPLATES}"/syslinux/* tftpboot/pxelinux.cfg + mv tftpboot/pxelinux.cfg/pxelinux.cfg tftpboot/pxelinux.cfg/default + sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' tftpboot/pxelinux.cfg/isolinux.txt # Copying splash screen if [ -n "${LIVE_SYSLINUX_SPLASH}" ] then - cp "${LIVE_SYSLINUX_SPLASH}" "${LIVE_ROOT}/tftpboot/pxelinux.cfg/splash.rle" + cp "${LIVE_SYSLINUX_SPLASH}" ftpboot/pxelinux.cfg/splash.rle fi # Configure syslinux templates - sed -i -e "s/LIVE_SERVER_ADDRESS/${LIVE_SERVER_ADDRESS}/" -e "s#LIVE_SERVER_PATH#${LIVE_SERVER_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default - sed -i -e "s/LIVE_DATE/${DATE}/" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/f1.txt - sed -i -e "s/LIVE_VERSION/${VERSION}/" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/f10.txt + sed -i -e "s/LIVE_SERVER_ADDRESS/${LIVE_SERVER_ADDRESS}/" -e "s#LIVE_SERVER_PATH#${LIVE_SERVER_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" tftpboot/pxelinux.cfg/default + sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" tftpboot/pxelinux.cfg/f1.txt + sed -i -e "s/LIVE_VERSION/${VERSION}/" tftpboot/pxelinux.cfg/f10.txt # Remove unused files - rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.cfg + rm -f tftpboot/pxelinux.cfg/isolinux.cfg ;; - usb) + usb|hdd) # Copying syslinux - mkdir -p "${LIVE_ROOT}"/binary - cp "${LIVE_CHROOT}"/usr/lib/syslinux/isolinux.bin "${LIVE_ROOT}"/binary/syslinux.bin - cp -r "${LIVE_TEMPLATES}"/syslinux/* "${LIVE_ROOT}"/binary - mv "${LIVE_ROOT}"/binary/isolinux.cfg "${LIVE_ROOT}"/binary/syslinux.cfg - mv "${LIVE_ROOT}"/binary/isolinux.txt "${LIVE_ROOT}"/binary/syslinux.txt - sed -i -e "s/isolinux.txt/syslinux.txt/" "${LIVE_ROOT}"/binary/syslinux.cfg + mkdir -p binary + cp chroot/usr/lib/syslinux/isolinux.bin binary/syslinux.bin + cp -r "${LIVE_TEMPLATES}"/syslinux/* binary + mv binary/isolinux.cfg binary/syslinux.cfg + mv binary/isolinux.txt binary/syslinux.txt + sed -i -e "s/isolinux.txt/syslinux.txt/" binary/syslinux.cfg # Copying splash screen if [ -n "${LIVE_SYSLINUX_SPLASH}" ] then - cp "${LIVE_SYSLINUX_SPLASH}" "${LIVE_ROOT}/binary/splash.rle" + cp "${LIVE_SYSLINUX_SPLASH}" binary/splash.rle fi # Configure syslinux templates - sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/binary/syslinux.cfg - sed -i -e "s/LIVE_DATE/${DATE}/" "${LIVE_ROOT}"/binary/f1.txt - sed -i -e "s/LIVE_VERSION/${VERSION}/" "${LIVE_ROOT}"/binary/f10.txt + sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/syslinux.cfg + sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" binary/f1.txt + sed -i -e "s/LIVE_VERSION/${VERSION}/" binary/f10.txt # Remove unused files - rm -f "${LIVE_ROOT}"/binary/pxelinux.cfg + rm -f binary/pxelinux.cfg ;; esac @@ -137,7 +137,7 @@ then then # Removing syslinux case "${LH_APT}" in - apt) + apt|apt-get) Chroot "apt-get remove --purge --yes ${PACKAGES}" ;; @@ -148,5 +148,5 @@ then fi # Creating stage file - Create_stagefile "${LIVE_ROOT}"/.stage/binary_syslinux + Create_stagefile .stage/binary_syslinux fi |