summaryrefslogtreecommitdiff
path: root/scripts/build/binary_grub
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-09-07 15:11:20 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:21 +0100
commit83bc63f725263c571094e3af1c88c58992bf0ac6 (patch)
tree25be3b96127e122c9f1448f6155dea6b03293248 /scripts/build/binary_grub
parent293765885126c0fe429718f403be2802a225cd68 (diff)
downloadlive-build-83bc63f725263c571094e3af1c88c58992bf0ac6.zip
live-build-83bc63f725263c571094e3af1c88c58992bf0ac6.tar.gz
Updating internal variables from lh to lb scheme, should be the last piece to finish the live-helper to live-build rename.
Diffstat (limited to 'scripts/build/binary_grub')
-rwxr-xr-xscripts/build/binary_grub74
1 files changed, 37 insertions, 37 deletions
diff --git a/scripts/build/binary_grub b/scripts/build/binary_grub
index 1597b3c..802bfbe 100755
--- a/scripts/build/binary_grub
+++ b/scripts/build/binary_grub
@@ -11,7 +11,7 @@
set -e
# Including common functions
-. "${LH_BASE:-/usr/share/live/build}"/scripts/build.sh
+. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'installs grub into binary')"
@@ -24,7 +24,7 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-if [ "${LH_BOOTLOADER}" != "grub" ]
+if [ "${LB_BOOTLOADER}" != "grub" ]
then
exit 0
fi
@@ -68,7 +68,7 @@ Grub_live_entry ()
APPEND="${4}"
LINUX_LIVE="${LINUX_LIVE}\ntitle\t\tDebian GNU/Linux - ${LABEL}"
- LINUX_LIVE="${LINUX_LIVE}\nkernel\t\t/${KERNEL} boot=${INITFS} live-config LH_BOOTAPPEND_LIVE ${APPEND}"
+ LINUX_LIVE="${LINUX_LIVE}\nkernel\t\t/${KERNEL} boot=${INITFS} live-config LB_BOOTAPPEND_LIVE ${APPEND}"
LINUX_LIVE="${LINUX_LIVE}\ninitrd\t\t/${INITRD}"
}
@@ -112,12 +112,12 @@ Grub_install_entry ()
LINUX_INSTALL="${LINUX_INSTALL}\ntitle\t\t${LABEL} ${TYPE}"
- LINUX_INSTALL="${LINUX_INSTALL}\nkernel\t\t/${KERNEL} ${TAPPEND} ${LH_BOOTAPPEND_INSTALL}"
+ LINUX_INSTALL="${LINUX_INSTALL}\nkernel\t\t/${KERNEL} ${TAPPEND} ${LB_BOOTAPPEND_INSTALL}"
LINUX_INSTALL="${LINUX_INSTALL}\ninitrd\t\t/${INITRD}"
done
}
-case "${LH_INITRAMFS}" in
+case "${LB_INITRAMFS}" in
casper)
INITFS="casper"
;;
@@ -128,9 +128,9 @@ case "${LH_INITRAMFS}" in
esac
# Setting destination directory
-case "${LH_BINARY_IMAGES}" in
+case "${LB_BINARY_IMAGES}" in
iso*|tar)
- case "${LH_INITRAMFS}" in
+ case "${LB_INITRAMFS}" in
casper)
DESTDIR_LIVE="binary/casper"
;;
@@ -157,62 +157,62 @@ mkdir -p "${DESTDIR_LIVE}"
# Setting boot parameters
-case "${LH_ENCRYPTION}" in
+case "${LB_ENCRYPTION}" in
""|false)
;;
*)
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} encryption=${LH_ENCRYPTION}"
+ LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} encryption=${LB_ENCRYPTION}"
esac
-if [ -n "${LH_USERNAME}" ]
+if [ -n "${LB_USERNAME}" ]
then
- case "${LH_INITRAMFS}" in
+ case "${LB_INITRAMFS}" in
casper)
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
+ LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} username=${LB_USERNAME}"
;;
live-initramfs|live-boot)
- if [ "${LH_USERNAME}" != "user" ]
+ if [ "${LB_USERNAME}" != "user" ]
then
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
+ LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} username=${LB_USERNAME}"
fi
;;
esac
fi
-if [ -n "${LH_HOSTNAME}" ]
+if [ -n "${LB_HOSTNAME}" ]
then
- case "${LH_INITRAMFS}" in
+ case "${LB_INITRAMFS}" in
casper)
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
+ LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} hostname=${LB_HOSTNAME}"
;;
live-initramfs|live-boot)
- if [ "${LH_HOSTNAME}" != "debian" ]
+ if [ "${LB_HOSTNAME}" != "debian" ]
then
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
+ LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} hostname=${LB_HOSTNAME}"
fi
;;
esac
fi
-if [ "${LH_UNION_FILESYSTEM}" != "aufs" ]
+if [ "${LB_UNION_FILESYSTEM}" != "aufs" ]
then
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} union=${LH_UNION_FILESYSTEM}"
+ LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} union=${LB_UNION_FILESYSTEM}"
fi
-if [ -n "${LH_NET_COW_PATH}" ]
+if [ -n "${LB_NET_COW_PATH}" ]
then
Echo_error "Net cow not yet supported on grub"
exit 1
fi
-if [ "${LH_EXPOSED_ROOT}" != "false" ]
+if [ "${LB_EXPOSED_ROOT}" != "false" ]
then
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} exposedroot"
+ LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} exposedroot"
fi
-LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's| ||')"
+LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt
FAILSAFE="noapic noapm nodma nomce nolapic nomodeset nosmp vga=normal"
@@ -220,7 +220,7 @@ FAILSAFE="noapic noapm nodma nomce nolapic nomodeset nosmp vga=normal"
# Assembling kernel configuration
# Default entries
-DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
+DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
@@ -238,7 +238,7 @@ done
LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's|binary||g' -e 's|//|/|g')"
# Assembling debian-installer configuration
-if [ "${LH_DEBIAN_INSTALLER}" != "false" ]
+if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
then
LINUX_LIVE="title\t\tLive:\nroot\n\n${LINUX_LIVE}"
LINUX_INSTALL="title\t\tInstaller:\nroot"
@@ -268,7 +268,7 @@ LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g'
if [ -f "${DESTDIR_LIVE}"/memtest ]
then
MEMTEST="title\t\tOther:\nroot"
- MEMTEST="${MEMTEST}\n\ntitle\t\t${LH_MEMTEST}\nkernel\t\t/$(basename ${DESTDIR_LIVE})/memtest"
+ MEMTEST="${MEMTEST}\n\ntitle\t\t${LB_MEMTEST}\nkernel\t\t/$(basename ${DESTDIR_LIVE})/memtest"
MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's|//|/|g')"
fi
@@ -276,7 +276,7 @@ fi
mkdir -p binary/boot/grub
cp -r "${TEMPLATES}"/* binary/boot/grub
-case ${LH_BINARY_IMAGES} in
+case ${LB_BINARY_IMAGES} in
iso*)
FILES="chroot/usr/lib/grub/*/stage2_eltorito"
;;
@@ -286,7 +286,7 @@ case ${LH_BINARY_IMAGES} in
;;
esac
-if [ "${LH_BUILD_WITH_CHROOT}" = "false" ]
+if [ "${LB_BUILD_WITH_CHROOT}" = "false" ]
then
FILES="$(echo ${FILES} | sed -e 's|chroot||g')"
fi
@@ -303,15 +303,15 @@ fi
# Copying splash screen
if [ -f config/binary_grub/splash.xpm.gz ]
then
- LH_GRUB_SPLASH="config/binary_grub/splash.xpm.gz"
+ LB_GRUB_SPLASH="config/binary_grub/splash.xpm.gz"
elif [ -f config/binary_grub/splash.xpm ]
then
- LH_GRUB_SPLASH="config/binary_grub/splash.xpm"
+ LB_GRUB_SPLASH="config/binary_grub/splash.xpm"
fi
-if [ -n "${LH_GRUB_SPLASH}" ]
+if [ -n "${LB_GRUB_SPLASH}" ]
then
- if [ "${LH_GRUB_SPLASH}" = "none" ]
+ if [ "${LB_GRUB_SPLASH}" = "none" ]
then
# Removing splash file
rm -f binary/boot/grub/splash.xpm.gz
@@ -320,13 +320,13 @@ then
sed -i -e "s|splashimage.*||" binary/boot/grub/menu.lst
else
# Overwriting splash file
- cp -f "${LH_GRUB_SPLASH}" binary/boot/grub
- sed -i -e "s|splashimage.*|splashimage /boot/grub/$(basename ${LH_GRUB_SPLASH})|" binary/boot/grub/menu.lst
+ cp -f "${LB_GRUB_SPLASH}" binary/boot/grub
+ sed -i -e "s|splashimage.*|splashimage /boot/grub/$(basename ${LB_GRUB_SPLASH})|" binary/boot/grub/menu.lst
fi
fi
sed -i -e "s|LINUX_LIVE|${LINUX_LIVE}|" -e "s|LINUX_INSTALL|${LINUX_INSTALL}|" -e "s|MEMTEST|${MEMTEST}|" binary/boot/grub/menu.lst
-sed -i -e "s|LH_BOOTAPPEND_INSTALL|${LH_BOOTAPPEND_INSTALL}|" -e "s|LH_BOOTAPPEND_LIVE|${LH_BOOTAPPEND_LIVE}|" binary/boot/grub/menu.lst
+sed -i -e "s|LB_BOOTAPPEND_INSTALL|${LB_BOOTAPPEND_INSTALL}|" -e "s|LB_BOOTAPPEND_LIVE|${LB_BOOTAPPEND_LIVE}|" binary/boot/grub/menu.lst
sed -i -e 's|\ $||g' binary/boot/grub/menu.lst