1 |
commit: 1e65133983f404ea64079df0933dd820619a9b44 |
2 |
Author: vitalogy <vitalogy_github <AT> milaw <DOT> biz> |
3 |
AuthorDate: Sun Nov 1 19:28:25 2015 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 1 19:28:25 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e651339 |
7 |
|
8 |
sys-boot/systemrescuecd-x86-grub: new ebuild |
9 |
|
10 |
.../files/systemrescuecd.default | 21 +++++++ |
11 |
.../files/systemrescuecd.grub | 65 ++++++++++++++++++++++ |
12 |
sys-boot/systemrescuecd-x86-grub/metadata.xml | 17 ++++++ |
13 |
.../systemrescuecd-x86-grub-0.1.ebuild | 33 +++++++++++ |
14 |
4 files changed, 136 insertions(+) |
15 |
|
16 |
diff --git a/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default |
17 |
new file mode 100644 |
18 |
index 0000000..d9b2d0b |
19 |
--- /dev/null |
20 |
+++ b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default |
21 |
@@ -0,0 +1,21 @@ |
22 |
+# Here you can set custom bootoptions for the SystemRescueCD |
23 |
+# |
24 |
+# You can add for example in a space separated list: |
25 |
+# setkmap=xx: which defines the keymap to load (example: setkmap=de) |
26 |
+# dostartx: load the X.Org graphical environment and launch Xfce |
27 |
+# docache: causes the iso file to be fully loaded into memory |
28 |
+# this requires 400MB of memory to cache everything |
29 |
+# doload=xxx: loads needed kernel modules (example: doload=3c59x,e1000) |
30 |
+# noload=xxx: prevents loading kernel modules |
31 |
+# nomodeset: do not load the Kernel-Mode-Setting video driver |
32 |
+# |
33 |
+# Example: |
34 |
+# SRCD_BOOTOPTIONS="setkmap=de docache dostartx" |
35 |
+# |
36 |
+# For all available bootoptions see: |
37 |
+# http://www.sysresccd.org/Sysresccd-manual-en_Booting_the_CD-ROM |
38 |
+# |
39 |
+# Note: |
40 |
+# After changing this, you must update your grub configuration file, to take effect |
41 |
+ |
42 |
+SRCD_BOOTOPTIONS="" |
43 |
|
44 |
diff --git a/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub |
45 |
new file mode 100644 |
46 |
index 0000000..b69f298 |
47 |
--- /dev/null |
48 |
+++ b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub |
49 |
@@ -0,0 +1,65 @@ |
50 |
+#!/bin/sh |
51 |
+# Copyright 1999-2015 Gentoo Foundation |
52 |
+# Distributed under the terms of the GNU General Public License v2 |
53 |
+# $Id$ |
54 |
+ |
55 |
+. /usr/share/grub/grub-mkconfig_lib |
56 |
+ |
57 |
+if [ -r /etc/default/systemrescuecd ] ; then |
58 |
+ . /etc/default/systemrescuecd |
59 |
+fi |
60 |
+ |
61 |
+# srcd = path of newest link to iso of systemrescuecd, created by the ebuild |
62 |
+# of systemrescuecd-x86 |
63 |
+srcd="/usr/share/systemrescuecd/systemrescuecd-x86-newest.iso" |
64 |
+ |
65 |
+longname="SystemRescueCD" |
66 |
+bootops=")" |
67 |
+ |
68 |
+if [ ! -z "${SRCD_BOOTOPTIONS}" ]; then |
69 |
+ bootops=" with bootoptions)" |
70 |
+fi |
71 |
+ |
72 |
+if [ -f "${srcd}" ]; then |
73 |
+ |
74 |
+ device=$(${grub_probe} --target=device "${srcd}") |
75 |
+ path=$(make_system_path_relative_to_its_root "${srcd}") |
76 |
+ grub_string=$(prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab) |
77 |
+ |
78 |
+ gettext_printf "Found %s on %s\n" "${longname}" "${device}" >&2 |
79 |
+ onstr=$(gettext_printf "(on %s)" "${device}") |
80 |
+ |
81 |
+ cat << EOF |
82 |
+submenu "${longname}" --class submenu { |
83 |
+ menuentry "${longname} (32bit standard${bootops}" --class rescue { |
84 |
+${grub_string} |
85 |
+ set isofile=${srcd} |
86 |
+ loopback loop \${isofile} |
87 |
+ linux (loop)/isolinux/rescue32 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} |
88 |
+ initrd (loop)/isolinux/initram.igz |
89 |
+ } |
90 |
+ menuentry "${longname} (64bit standard${bootops}" --class rescue { |
91 |
+${grub_string} |
92 |
+ set isofile=${srcd} |
93 |
+ loopback loop \${isofile} |
94 |
+ linux (loop)/isolinux/rescue64 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} |
95 |
+ initrd (loop)/isolinux/initram.igz |
96 |
+ } |
97 |
+ menuentry "${longname} (32bit alternative${bootops}" --class rescue { |
98 |
+${grub_string} |
99 |
+ set isofile=${srcd} |
100 |
+ loopback loop \${isofile} |
101 |
+ linux (loop)/isolinux/altker32 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} |
102 |
+ initrd (loop)/isolinux/initram.igz |
103 |
+ } |
104 |
+ menuentry "${longname} (64bit alternative${bootops}" --class rescue { |
105 |
+${grub_string} |
106 |
+ set isofile=${srcd} |
107 |
+ loopback loop \${isofile} |
108 |
+ linux (loop)/isolinux/altker64 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} |
109 |
+ initrd (loop)/isolinux/initram.igz |
110 |
+ } |
111 |
+} |
112 |
+EOF |
113 |
+ |
114 |
+fi |
115 |
|
116 |
diff --git a/sys-boot/systemrescuecd-x86-grub/metadata.xml b/sys-boot/systemrescuecd-x86-grub/metadata.xml |
117 |
new file mode 100644 |
118 |
index 0000000..608603e |
119 |
--- /dev/null |
120 |
+++ b/sys-boot/systemrescuecd-x86-grub/metadata.xml |
121 |
@@ -0,0 +1,17 @@ |
122 |
+<?xml version='1.0' encoding='UTF-8'?> |
123 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
124 |
+<pkgmetadata> |
125 |
+ <maintainer> |
126 |
+ <name>Michael Lange</name> |
127 |
+ <email>gentoobugs@×××××.biz</email> |
128 |
+ <description>Accepts only mails from Gentoo's Bugzilla</description> |
129 |
+ </maintainer> |
130 |
+ <maintainer> |
131 |
+ <name>Michał Górny</name> |
132 |
+ <email>mgorny@g.o</email> |
133 |
+ </maintainer> |
134 |
+ <longdescription> |
135 |
+ This package adds menu entries in GRUB for the SystemRescueCD. You can |
136 |
+ add custom bootoptions for SystemRescueCD in a special config file. |
137 |
+ </longdescription> |
138 |
+</pkgmetadata> |
139 |
|
140 |
diff --git a/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild b/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild |
141 |
new file mode 100644 |
142 |
index 0000000..32f5706 |
143 |
--- /dev/null |
144 |
+++ b/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild |
145 |
@@ -0,0 +1,33 @@ |
146 |
+# Copyright 1999-2015 Gentoo Foundation |
147 |
+# Distributed under the terms of the GNU General Public License v2 |
148 |
+# $Id$ |
149 |
+ |
150 |
+EAPI=5 |
151 |
+ |
152 |
+DESCRIPTION="Grub menu entries for the .iso image of systemrescuecd-x86" |
153 |
+HOMEPAGE="http://www.sysresccd.org/" |
154 |
+SRC_URI="" |
155 |
+ |
156 |
+LICENSE="GPL-2" |
157 |
+SLOT=0 |
158 |
+KEYWORDS="~amd64 ~x86" |
159 |
+IUSE="" |
160 |
+ |
161 |
+S=${WORKDIR} |
162 |
+ |
163 |
+RDEPEND="app-admin/systemrescuecd-x86 |
164 |
+ sys-boot/grub" |
165 |
+ |
166 |
+src_install() { |
167 |
+ exeinto /etc/grub.d |
168 |
+ newexe "${FILESDIR}"/systemrescuecd.grub 39_systemrescuecd |
169 |
+ |
170 |
+ insinto /etc/default |
171 |
+ newins "${FILESDIR}"/systemrescuecd.default systemrescuecd |
172 |
+} |
173 |
+ |
174 |
+pkg_postinst() { |
175 |
+ elog "To add the menu entries for systemrescuecd to grub, you should now run" |
176 |
+ elog " grub-mkconfig -o /boot/grub/grub.cfg" |
177 |
+ elog "You can set custom bootoptions in /etc/default/systemrescuecd" |
178 |
+} |