summaryrefslogtreecommitdiff
path: root/sys-boot/customrescuecd-x86_64-grub
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-04-12 21:03:09 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-04-12 21:03:09 +0000
commitd97953e6ff67978da9554e7b4601aedceb21e215 (patch)
tree674053c902db6972b9716c9ac3b1e960ee7a5358 /sys-boot/customrescuecd-x86_64-grub
parent1d1fa5bb30df70070bbbbd2b777b839d31f09c41 (diff)
downloadbaldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.tar.gz
baldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.tar.xz
baldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.zip
Adding metadata
Diffstat (limited to 'sys-boot/customrescuecd-x86_64-grub')
-rw-r--r--sys-boot/customrescuecd-x86_64-grub/customrescuecd-x86_64-grub-0.1.ebuild31
-rw-r--r--sys-boot/customrescuecd-x86_64-grub/files/customrescuecd.default7
-rw-r--r--sys-boot/customrescuecd-x86_64-grub/files/customrescuecd.grub43
-rw-r--r--sys-boot/customrescuecd-x86_64-grub/metadata.xml12
4 files changed, 93 insertions, 0 deletions
diff --git a/sys-boot/customrescuecd-x86_64-grub/customrescuecd-x86_64-grub-0.1.ebuild b/sys-boot/customrescuecd-x86_64-grub/customrescuecd-x86_64-grub-0.1.ebuild
new file mode 100644
index 000000000000..2cbc487ce084
--- /dev/null
+++ b/sys-boot/customrescuecd-x86_64-grub/customrescuecd-x86_64-grub-0.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Grub menu entries for the .iso image of customrescuecd"
+HOMEPAGE="https://sourceforge.net/projects/customrescuecd/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT=0
+KEYWORDS="~amd64"
+
+S=${WORKDIR}
+
+RDEPEND="app-admin/customrescuecd-x86_64
+ sys-boot/grub"
+
+src_install() {
+ exeinto /etc/grub.d
+ newexe "${FILESDIR}"/customrescuecd.grub 39_customrescuecd
+
+ insinto /etc/default
+ newins "${FILESDIR}"/customrescuecd.default customrescuecd
+}
+
+pkg_postinst() {
+ elog "To add the menu entries for customrescuecd to grub, you should now run"
+ elog " grub-mkconfig -o /boot/grub/grub.cfg"
+ elog "You can set custom bootoptions in /etc/default/customrescuecd"
+}
diff --git a/sys-boot/customrescuecd-x86_64-grub/files/customrescuecd.default b/sys-boot/customrescuecd-x86_64-grub/files/customrescuecd.default
new file mode 100644
index 000000000000..4392c3337a67
--- /dev/null
+++ b/sys-boot/customrescuecd-x86_64-grub/files/customrescuecd.default
@@ -0,0 +1,7 @@
+Here you can set custom bootoptions for the CustomRescueCD
+#
+# You can add for example in a space separated list:
+# copytoram: causes the iso file to be fully loaded into memory
+# this requires 1.5GB of memory to cache everything
+
+CRCD_BOOTOPTIONS=""
diff --git a/sys-boot/customrescuecd-x86_64-grub/files/customrescuecd.grub b/sys-boot/customrescuecd-x86_64-grub/files/customrescuecd.grub
new file mode 100644
index 000000000000..5087ebdf797d
--- /dev/null
+++ b/sys-boot/customrescuecd-x86_64-grub/files/customrescuecd.grub
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+. /usr/share/grub/grub-mkconfig_lib
+
+if [ -r /etc/default/customrescuecd ] ; then
+ . /etc/default/customrescuecd
+fi
+
+# crcd = path of newest link to iso of customrescuecd, created by the ebuild
+# of customrescuecd-x86_64
+
+crcd="/usr/share/systemrescuecd/systemrescuecd-x86_64-newest.iso"
+
+longname="CustomRescueCD"
+bootops=")"
+
+if [ ! -z "${CRCD_BOOTOPTIONS}" ]; then
+ bootops=" with bootoptions)"
+fi
+
+if [ -f "${crcd}" ]; then
+
+ device=$(${grub_probe} --target=device "${crcd}")
+ path=$(make_system_path_relative_to_its_root "${crcd}")
+ grub_string=$(prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab)
+
+ gettext_printf "Found %s on %s\n" "${longname}" "${device}" >&2
+ onstr=$(gettext_printf "(on %s)" "${device}")
+
+ cat << EOF
+submenu "${longname}" --class submenu {
+ menuentry "${longname} (64bit ${bootops}" --class rescue {
+${grub_string}
+ set isofile=${path}
+ loopback loop \${isofile}
+ linux (loop)/boot/x86_64/customrescue64 ${CRCD_BOOTOPTIONS} customisobasedir=customresccd customisolabel=CRC64 vga=791 net.ifnames=0
+ }
+}
+EOF
+
+fi
diff --git a/sys-boot/customrescuecd-x86_64-grub/metadata.xml b/sys-boot/customrescuecd-x86_64-grub/metadata.xml
new file mode 100644
index 000000000000..9a41a3c4a118
--- /dev/null
+++ b/sys-boot/customrescuecd-x86_64-grub/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>andrea.postiglione@gmail.com</email>
+ <name>Andrea Postiglione</name>
+ </maintainer>
+ <longdescription lang="en">
+ This package adds menu entries in GRUB for the CustomRescueCD. You can
+ add custom bootoptions for CustomRescueCD in a special config file.
+ </longdescription>
+</pkgmetadata>