1 |
pva 11/04/01 11:34:55 |
2 |
|
3 |
Added: vzctl-3.0.26.2-vzeventd.patch |
4 |
Log: |
5 |
Added note about vzeventd. Added support for solid kernel, #361457. Enable reboot notification, fixes #361453. Thank Andreis_Vinogradovs (slepnoga) for finding all of this. |
6 |
|
7 |
(Portage version: 2.1.9.45/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-cluster/vzctl/files/vzctl-3.0.26.2-vzeventd.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.26.2-vzeventd.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.26.2-vzeventd.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: vzctl-3.0.26.2-vzeventd.patch |
16 |
=================================================================== |
17 |
From f24b1603090c6d4af163d42eff620fcfaa7c6297 Mon Sep 17 00:00:00 2001 |
18 |
From: Peter Volkov <pva@g.o> |
19 |
Date: Fri, 1 Apr 2011 14:25:45 +0400 |
20 |
Subject: [PATCH] vzeventd-gentoo: set reboot_event, solid kernel |
21 |
|
22 |
Allow it to work when modules are built in (MODULES_DISABLED=yes). |
23 |
Set /sys/module/vzevent/parameters/reboot_event=1 on service startup. |
24 |
Small clenups. |
25 |
|
26 |
Fixes Gentoo bugs: |
27 |
http://bugs.gentoo.org/show_bug.cgi?id=361453 |
28 |
http://bugs.gentoo.org/show_bug.cgi?id=361457 |
29 |
--- |
30 |
etc/init.d/vzeventd-gentoo.in | 40 ++++++++++++++++++++++++++++------------ |
31 |
1 files changed, 28 insertions(+), 12 deletions(-) |
32 |
|
33 |
diff --git a/etc/init.d/vzeventd-gentoo.in b/etc/init.d/vzeventd-gentoo.in |
34 |
index e8fe64e..2c0da26 100644 |
35 |
--- a/etc/init.d/vzeventd-gentoo.in |
36 |
+++ b/etc/init.d/vzeventd-gentoo.in |
37 |
@@ -6,25 +6,41 @@ depend() { |
38 |
} |
39 |
|
40 |
check_config() { |
41 |
-# if we don't want openvz running, say so |
42 |
+ source /etc/conf.d/vz |
43 |
+ # if we don't want openvz running, say so |
44 |
[ "${VIRTUOZZO}" = "yes" ] || return 1 |
45 |
: ${VZEVENTD:=@SBINDIR@/vzeventd} |
46 |
} |
47 |
|
48 |
+load_module() { |
49 |
+ if [ "${MODULES_DISABLED}" != "yes" ]; then |
50 |
+ local rv=0 |
51 |
+ ebegin "Loading vzevent module" |
52 |
+ modprobe -r vzevent >/dev/null 2>&1 |
53 |
+ modprobe vzevent reboot_event=1 >/dev/null 2>&1 |
54 |
+ rv=$? |
55 |
+ if [ ${rv} -ne 0 ]; then |
56 |
+ eend ${rv} |
57 |
+ return ${rv} |
58 |
+ fi |
59 |
+ fi |
60 |
+ |
61 |
+ local param=/sys/module/vzevent/parameters/reboot_event |
62 |
+ if ! grep -Fqw 1 "${param}"; then |
63 |
+ ewarn "vzevent module should be loaded with reboot_event=1 parameter" |
64 |
+ ewarn "setting reboot_event to 1..." |
65 |
+ ewarn "echo 1 > ${param}" |
66 |
+ echo 1 > "${param}" |
67 |
+ fi |
68 |
+ return 0 |
69 |
+} |
70 |
+ |
71 |
start() { |
72 |
check_config || return |
73 |
- ebegin "Loading vzevent module" |
74 |
- modprobe -r vzevent >/dev/null 2>&1 |
75 |
- modprobe vzevent reboot_event=1 >/dev/null 2>&1 |
76 |
- rc=$? |
77 |
- if [ ${rc} -ne 0 ]; then |
78 |
- eend ${rc} "failed" |
79 |
- return ${rc} |
80 |
- fi |
81 |
- eend ${rc} |
82 |
+ load_module || return |
83 |
|
84 |
ebegin "Starting vzeventd" |
85 |
- start-stop-daemon --start --exec $VZEVENTD \ |
86 |
+ start-stop-daemon --start --exec ${VZEVENTD} \ |
87 |
--pidfile /var/run/vzeventd.pid \ |
88 |
-- ${VZEVENTD_OPTS} |
89 |
eend $? |
90 |
@@ -33,7 +49,7 @@ start() { |
91 |
stop() { |
92 |
check_config || return |
93 |
ebegin "Stopping vzeventd" |
94 |
- start-stop-daemon --stop --exec $VZEVENTD \ |
95 |
+ start-stop-daemon --stop --exec ${VZEVENTD} \ |
96 |
--pidfile /var/run/vzeventd.pid |
97 |
eend $? |
98 |
} |
99 |
-- |
100 |
1.7.3.4 |