1 |
jlec 13/03/27 11:50:55 |
2 |
|
3 |
Modified: kexec.init-2.0.3 |
4 |
Added: kexec.conf-2.0.4 kexec.init-2.0.4 |
5 |
kexec-tools-2.0.4-disable-kexec-test.patch |
6 |
Log: |
7 |
sys-apps/kexec-tools: Version BUmp; drop bashism from initscript, #447548; enhanced detection of kernel and initrd image, #412039 |
8 |
|
9 |
(Portage version: 2.2.0_alpha169/cvs/Linux x86_64, signed Manifest commit with key 8009D6F070EB7916) |
10 |
|
11 |
Revision Changes Path |
12 |
1.2 sys-apps/kexec-tools/files/kexec.init-2.0.3 |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kexec-tools/files/kexec.init-2.0.3?rev=1.2&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kexec-tools/files/kexec.init-2.0.3?rev=1.2&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kexec-tools/files/kexec.init-2.0.3?r1=1.1&r2=1.2 |
17 |
|
18 |
Index: kexec.init-2.0.3 |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/files/kexec.init-2.0.3,v |
21 |
retrieving revision 1.1 |
22 |
retrieving revision 1.2 |
23 |
diff -u -r1.1 -r1.2 |
24 |
--- kexec.init-2.0.3 18 Mar 2012 07:46:02 -0000 1.1 |
25 |
+++ kexec.init-2.0.3 27 Mar 2013 11:50:55 -0000 1.2 |
26 |
@@ -1,7 +1,7 @@ |
27 |
#!/sbin/runscript |
28 |
-# Copyright 1999-2012 Gentoo Foundation |
29 |
+# Copyright 1999-2013 Gentoo Foundation |
30 |
# Distributed under the terms of the GNU General Public License v2 |
31 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/files/kexec.init-2.0.3,v 1.1 2012/03/18 07:46:02 jlec Exp $ |
32 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/files/kexec.init-2.0.3,v 1.2 2013/03/27 11:50:55 jlec Exp $ |
33 |
|
34 |
depend() { |
35 |
need localmount |
36 |
|
37 |
|
38 |
|
39 |
1.1 sys-apps/kexec-tools/files/kexec.conf-2.0.4 |
40 |
|
41 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kexec-tools/files/kexec.conf-2.0.4?rev=1.1&view=markup |
42 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kexec-tools/files/kexec.conf-2.0.4?rev=1.1&content-type=text/plain |
43 |
|
44 |
Index: kexec.conf-2.0.4 |
45 |
=================================================================== |
46 |
# Load kexec kernel image into memory during shutdown instead of bootup |
47 |
# (default: yes) |
48 |
#LOAD_DURING_SHUTDOWN="yes" |
49 |
|
50 |
# Additional arguments passed to kexec (8) |
51 |
#KEXEC_OPT_ARGS="" |
52 |
|
53 |
# Kernel image partition. Mounted automatically if not. |
54 |
# (default: /boot) |
55 |
#BOOTPART="/boot" |
56 |
|
57 |
# Root partition (should be autodetected) |
58 |
#ROOTPART="/dev/hda3" |
59 |
|
60 |
# Kernel image pathname, relative from BOOTPART. |
61 |
# If it's one of |
62 |
# {kernel-genkernel,bzImage,vmlinuz,kernel}-<currently running kernel version>, |
63 |
# or bzImage, vmlinuz (without suffix), |
64 |
# then it's automaticaly detected. |
65 |
# Setting it to "-" will disable kexec. |
66 |
#KNAME="vmlinuz-3.9.0" |
67 |
|
68 |
# Initrd |
69 |
# Same automatic detection restriction as for KNAME apply. |
70 |
# initramfs-genkernel-<currently running kernel version>, |
71 |
# initrd{,.img}-<currently running kernel version>{,.img} |
72 |
# will be detected. |
73 |
#INITRD="/boot/fbsplash-emergence-1024x768" |
74 |
|
75 |
# Kernel parameters (should be autodetected) |
76 |
#KPARAM="splash=silent,theme:emergence" |
77 |
|
78 |
# Do not try to mount /boot |
79 |
# DONT_MOUNT_BOOT="yes" |
80 |
|
81 |
|
82 |
|
83 |
1.1 sys-apps/kexec-tools/files/kexec.init-2.0.4 |
84 |
|
85 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kexec-tools/files/kexec.init-2.0.4?rev=1.1&view=markup |
86 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kexec-tools/files/kexec.init-2.0.4?rev=1.1&content-type=text/plain |
87 |
|
88 |
Index: kexec.init-2.0.4 |
89 |
=================================================================== |
90 |
#!/sbin/runscript |
91 |
# Copyright 1999-2013 Gentoo Foundation |
92 |
# Distributed under the terms of the GNU General Public License v2 |
93 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/files/kexec.init-2.0.4,v 1.1 2013/03/27 11:50:55 jlec Exp $ |
94 |
|
95 |
depend() { |
96 |
need localmount |
97 |
} |
98 |
|
99 |
image_path() { |
100 |
local x= kver=$(uname -r) karch=$(uname -m) |
101 |
BOOTPART="${BOOTPART:-/boot}" |
102 |
for x in "${KNAME:-bzImage}" vmlinuz \ |
103 |
bzImage-${kver} vmlinuz-${kver} \ |
104 |
kernel-genkernel-${karch}-${kver} \ |
105 |
kernel-${kver} kernel-${karch}; do |
106 |
if [ -e "${BOOTPART}/${x}" ]; then |
107 |
echo "${BOOTPART}/${x}" |
108 |
return 0 |
109 |
fi |
110 |
done |
111 |
|
112 |
return 1 |
113 |
} |
114 |
|
115 |
initrd_path() { |
116 |
local x= kver=$(uname -r) karch=$(uname -m) |
117 |
BOOTPART="${BOOTPART:-/boot}" |
118 |
for x in "${INITRD:-initrd}" \ |
119 |
initrd.img-${kver} initrd-${kver}.img \ |
120 |
initrd-${kver} initramfs-${kver}.img \ |
121 |
initramfs-genkernel-${karch}-${kver} ; do |
122 |
if [ -e "${BOOTPART}/${x}" ]; then |
123 |
echo "${BOOTPART}/${x}" |
124 |
return 0 |
125 |
fi |
126 |
done |
127 |
|
128 |
return 1 |
129 |
} |
130 |
|
131 |
mount_boot(){ |
132 |
local ret |
133 |
|
134 |
[ -n ${DONT_MOUNT_BOOT} ] && return 1 |
135 |
grep -q " ${BOOTPART:-/boot} " /proc/mounts && return 1 |
136 |
|
137 |
BOOTPART="${BOOTPART:-/boot}" |
138 |
ebegin "Mounting ${BOOTPART}" |
139 |
mount "${BOOTPART}"; ret=$? |
140 |
eend ${ret} |
141 |
return ${ret} |
142 |
} |
143 |
|
144 |
load_image() { |
145 |
local ret |
146 |
if [ "${KNAME}" = "-" ]; then |
147 |
ebegin "Disabling kexec" |
148 |
kexec -u; ret=$? |
149 |
eend ${ret} |
150 |
return ${ret} |
151 |
fi |
152 |
|
153 |
BOOTPART="${BOOTPART:-/boot}" |
154 |
local img= initrd="$(initrd_path)" mounted=false initrdopt= |
155 |
|
156 |
if ! img="$(image_path)"; then |
157 |
if mount_boot; then |
158 |
if img="$(image_path)"; then |
159 |
mounted=true |
160 |
initrd="$(initrd_path)" |
161 |
else |
162 |
eerror "No kernel image found in ${BOOTPART}!" |
163 |
umount "${BOOTPART}" |
164 |
return 1 |
165 |
fi |
166 |
else |
167 |
eerror "No kernel image found in ${BOOTPART}!" |
168 |
return 1 |
169 |
fi |
170 |
fi |
171 |
|
172 |
if [ -n ${INITRD}] && [ -z ${initrd} ]; then |
173 |
eerror "Requested initrd: ${INITRD}" |
174 |
eerror "could not be found" |
175 |
return 1 |
176 |
fi |
177 |
|
178 |
[ -n "${ROOTPART}" ] || \ |
179 |
ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")" |
180 |
|
181 |
[ -n "${KPARAM}" ] || KEXEC_OPT_ARGS+=" --reuse-cmdline" |
182 |
|
183 |
[ -n "${initrd}" ] && [ -e "${initrd}" ] && initrdopt="--initrd=${initrd}" |
184 |
|
185 |
local msg= |
186 |
[ -n ${initrd} ] && \ |
187 |
msg="with ${initrd}" |
188 |
einfo "Using kernel image ${img} ${msg} for kexec" |
189 |
|
190 |
ebegin "Setting kexec with ${KEXEC_OPT_ARGS} -l ${img} root=${ROOTPART} ${KPARAM} ${initrdopt}" |
191 |
kexec ${KEXEC_OPT_ARGS} -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt} |
192 |
local res=$? |
193 |
|
194 |
${mounted} && umount "${BOOTPART}" |
195 |
eend ${res} |
196 |
return ${res} |
197 |
} |
198 |
|
199 |
start() { |
200 |
if [ "${LOAD_DURING_SHUTDOWN:-yes}" = "yes" ]; then |
201 |
if ! image_path > /dev/null; then |
202 |
ewarn "Cannot find kernel image!" |
203 |
ewarn "Please make sure a valid kernel image is present before reboot." |
204 |
return 0 |
205 |
fi |
206 |
else |
207 |
ebegin "Configuring kexec" |
208 |
load_image |
209 |
eend $? |
210 |
fi |
211 |
} |
212 |
|
213 |
stop() { |
214 |
[ "${LOAD_DURING_SHUTDOWN:-yes}" != "yes" ] && return 0 |
215 |
|
216 |
if ! yesno $RC_REBOOT; then |
217 |
einfo "Not rebooting, so disabling" |
218 |
kexec -u |
219 |
return 0 |
220 |
fi |
221 |
|
222 |
if [ -f /nokexec ]; then |
223 |
einfo "Not using kexec during reboot" |
224 |
rm -f /nokexec |
225 |
kexec -u |
226 |
return 0 |
227 |
fi |
228 |
|
229 |
ebegin "Configuring kexec" |
230 |
load_image |
231 |
eend $? |
232 |
} |
233 |
|
234 |
|
235 |
|
236 |
1.1 sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch |
237 |
|
238 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch?rev=1.1&view=markup |
239 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch?rev=1.1&content-type=text/plain |
240 |
|
241 |
Index: kexec-tools-2.0.4-disable-kexec-test.patch |
242 |
=================================================================== |
243 |
diff --git kexec-tools-2.0.3/kexec_test/Makefile kexec-tools-2.0.3/kexec_test/Makefile |
244 |
index fec6210..2ed4d51 100644 |
245 |
--- kexec-tools-2.0.3/kexec_test/Makefile |
246 |
+++ kexec-tools-2.0.3/kexec_test/Makefile |
247 |
@@ -8,12 +8,6 @@ dist += kexec_test/Makefile $(KEXEC_TEST_SRCS) \ |
248 |
kexec_test/x86-setup-legacy-pic.S |
249 |
|
250 |
BUILD_KEXEC_TEST = no |
251 |
-ifeq ($(ARCH),i386) |
252 |
-BUILD_KEXEC_TEST = yes |
253 |
-endif |
254 |
-ifeq ($(ARCH),x86_64) |
255 |
-BUILD_KEXEC_TEST = yes |
256 |
-endif |
257 |
|
258 |
ifeq ($(BUILD_KEXEC_TEST),yes) |