summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-04-29 07:52:56 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2015-04-29 07:52:56 +0200
commit7e633e77f24b6f5ab9a8b22d7d6cf6521454d638 (patch)
treec4a11950037f0e66cd79e00761302f8cc8acfb76
parent7f6b1d71f8f6c66a78ba88f19cf12c035476f4ef (diff)
downloadvyos-live-build-7e633e77f24b6f5ab9a8b22d7d6cf6521454d638.tar.gz
vyos-live-build-7e633e77f24b6f5ab9a8b22d7d6cf6521454d638.zip
Moving grub and grub2 templates into shared bootloader config directory.
-rw-r--r--Makefile2
-rwxr-xr-xfunctions/defaults.sh8
-rwxr-xr-xfunctions/templates.sh25
-rwxr-xr-xscripts/build/binary_grub16
-rwxr-xr-xscripts/build/binary_grub216
-rwxr-xr-xscripts/build/config12
-rw-r--r--share/bootloaders/grub/menu.lst (renamed from templates/grub/menu.lst)0
-rw-r--r--share/bootloaders/grub/splash.xpm.gz (renamed from templates/grub/splash.xpm.gz)bin32058 -> 32058 bytes
-rw-r--r--share/bootloaders/grub2/grub.cfg (renamed from templates/grub2/grub.cfg)0
-rw-r--r--share/bootloaders/grub2/splash.tga (renamed from templates/grub2/splash.tga)bin50004 -> 50004 bytes
10 files changed, 32 insertions, 47 deletions
diff --git a/Makefile b/Makefile
index f867c6b3e..965719f65 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ build:
install:
# Installing shared data
mkdir -p $(DESTDIR)/usr/share/live/build
- cp -r data functions templates VERSION $(DESTDIR)/usr/share/live/build
+ cp -r data functions VERSION $(DESTDIR)/usr/share/live/build
cp -r share/* $(DESTDIR)/usr/share/live/build
# Installing executables
diff --git a/functions/defaults.sh b/functions/defaults.sh
index a1040d786..5f93f4ac0 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -341,14 +341,6 @@ Set_defaults ()
;;
esac
- # Setting templates
- if [ -n "${LIVE_BUILD}" ]
- then
- LB_TEMPLATES="${LB_TEMPLATES:-${LIVE_BUILD}/templates}"
- else
- LB_TEMPLATES="${LB_TEMPLATES:-/usr/share/live/build/templates}"
- fi
-
# Setting live build options
_BREAKPOINTS="${_BREAKPOINTS:-false}"
_COLOR="${_COLOR:-false}"
diff --git a/functions/templates.sh b/functions/templates.sh
deleted file mode 100755
index e22a7a1ed..000000000
--- a/functions/templates.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-## live-build(7) - System Build Scripts
-## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
-##
-## 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.
-
-
-Check_templates ()
-{
- PACKAGE="${1}"
-
- if [ -d "config/templates/${PACKAGE}" ]
- then
- TEMPLATES="config/templates/${PACKAGE}"
- elif [ -d "${LB_TEMPLATES}/${PACKAGE}" ]
- then
- TEMPLATES="${LB_TEMPLATES}/${PACKAGE}"
- else
- Echo_error "%s templates not accessible in %s nor config/templates" "${PACKAGE}" "${LB_TEMPLATES}"
- exit 1
- fi
-}
diff --git a/scripts/build/binary_grub b/scripts/build/binary_grub
index bde738023..008ce8292 100755
--- a/scripts/build/binary_grub
+++ b/scripts/build/binary_grub
@@ -117,6 +117,20 @@ Grub_install_entry ()
done
}
+if [ -e "config/bootloaders/grub" ]
+then
+ # Internal local copy
+ _SOURCE="config/bootloaders/grub"
+else
+ # Internal system copy
+ if [ -n "${LIVE_BUILD}" ]
+ then
+ _SOURCE="${LIVE_BUILD}/share/bootloaders/grub"
+ else
+ _SOURCE="/usr/share/live/build/bootloaders/grub"
+ fi
+fi
+
case "${LB_INITRAMFS}" in
casper)
INITFS="casper"
@@ -238,7 +252,7 @@ fi
# Copying templates
mkdir -p binary/boot/grub
-cp -r "${TEMPLATES}"/* binary/boot/grub
+cp -r "${_SOURCE}"/* binary/boot/grub
case ${LIVE_IMAGE_TYPE} in
iso*)
diff --git a/scripts/build/binary_grub2 b/scripts/build/binary_grub2
index 61f5dc6e0..926df668e 100755
--- a/scripts/build/binary_grub2
+++ b/scripts/build/binary_grub2
@@ -91,6 +91,20 @@ Grub_install_entry ()
LINUX_INSTALL="${LINUX_INSTALL}\n}"
}
+if [ -e "config/bootloaders/grub2" ]
+then
+ # Internal local copy
+ _SOURCE="config/bootloaders/grub2"
+else
+ # Internal system copy
+ if [ -n "${LIVE_BUILD}" ]
+ then
+ _SOURCE="${LIVE_BUILD}/share/bootloaders/grub2"
+ else
+ _SOURCE="/usr/share/live/build/bootloaders/grub2"
+ fi
+fi
+
case "${LB_INITRAMFS}" in
casper)
INITFS="casper"
@@ -211,7 +225,7 @@ fi
# Copying templates
mkdir -p binary/boot/grub/i386-pc
-cp -r "${TEMPLATES}"/* binary/boot/grub
+cp -r "${_SOURCE}"/* binary/boot/grub
case ${LIVE_IMAGE_TYPE} in
iso*)
diff --git a/scripts/build/config b/scripts/build/config
index 77f4029e0..5c0c92dd3 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -113,7 +113,6 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--swap-file-path PATH]\n\
\t [--swap-file-size MB]\n\
\t [--tasksel apt|aptitude|tasksel]\n\
-\t [--templates PATH]\n\
\t [--updates true|false]\n\
\t [--backports true|false]\n\
\t [--verbose]\n\
@@ -130,7 +129,7 @@ Local_arguments ()
apt-pipeline:,apt-recommends:,apt-secure:,apt-source-archives:,bootstrap:,cache:,cache-indices:,cache-packages:,
cache-stages:,debconf-frontend:,debconf-priority:,dump,
initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,tasksel:,
- templates:,architectures:,clean,
+ architectures:,clean,
distribution:,parent-distribution:,parent-debian-installer-distribution:,parent-mirror-bootstrap:,parent-mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-binary:,
parent-mirror-binary-security:,parent-mirror-debian-installer:,
mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,
@@ -329,11 +328,6 @@ Local_arguments ()
shift 2
;;
- --templates)
- LB_TEMPLATES="${2}"
- shift 2
- ;;
-
# config/bootstrap
-a|--architectures)
LB_ARCHITECTURES="${2}"
@@ -966,10 +960,6 @@ LB_SYSTEM="${LB_SYSTEM}"
# (Default: ${LB_TASKSEL})
LB_TASKSEL="${LB_TASKSEL}"
-# \$LB_TEMPLATES: set templates
-# (Default: ${LB_TEMPLATES})
-LB_TEMPLATES="${LB_TEMPLATES}"
-
# live-build options
# \$_BREAKPOINTS: enable breakpoints
diff --git a/templates/grub/menu.lst b/share/bootloaders/grub/menu.lst
index 3b866e5c7..3b866e5c7 100644
--- a/templates/grub/menu.lst
+++ b/share/bootloaders/grub/menu.lst
diff --git a/templates/grub/splash.xpm.gz b/share/bootloaders/grub/splash.xpm.gz
index f32e228a7..f32e228a7 100644
--- a/templates/grub/splash.xpm.gz
+++ b/share/bootloaders/grub/splash.xpm.gz
Binary files differ
diff --git a/templates/grub2/grub.cfg b/share/bootloaders/grub2/grub.cfg
index 3430b63a0..3430b63a0 100644
--- a/templates/grub2/grub.cfg
+++ b/share/bootloaders/grub2/grub.cfg
diff --git a/templates/grub2/splash.tga b/share/bootloaders/grub2/splash.tga
index 90b790db6..90b790db6 100644
--- a/templates/grub2/splash.tga
+++ b/share/bootloaders/grub2/splash.tga
Binary files differ