]>
Commit | Line | Data |
---|---|---|
4cb4934b JK |
1 | diff -dur LVM2.2.02.98.orig/scripts/blk_availability_init_red_hat.in LVM2.2.02.98/scripts/blk_availability_init_red_hat.in |
2 | --- LVM2.2.02.98.orig/scripts/blk_availability_init_red_hat.in 2012-10-15 16:24:58.000000000 +0200 | |
3 | +++ LVM2.2.02.98/scripts/blk_availability_init_red_hat.in 2012-10-25 12:01:33.000000000 +0200 | |
4 | @@ -1,4 +1,4 @@ | |
5 | -#!/bin/bash | |
6 | +#!/bin/sh | |
7 | # | |
8 | # Copyright (C) 2012 Red Hat, Inc. All rights reserved. | |
9 | # | |
10 | @@ -43,16 +43,20 @@ | |
11 | case "$1" in | |
12 | start) | |
13 | touch $LOCK_FILE | |
14 | + exit 0 | |
15 | ;; | |
16 | ||
17 | stop) | |
18 | - action "Stopping block device availability:" $sbindir/$script $options | |
19 | + run_cmd "Stopping block device availability:" $sbindir/$script $options | |
20 | rm -f $LOCK_FILE | |
21 | + exit 0 | |
22 | ;; | |
23 | ||
24 | status) | |
25 | + exit 0 | |
26 | ;; | |
27 | *) | |
28 | - echo $"Usage: $0 {start|stop|status}" | |
29 | + msg_usage "$0 {start|stop|status}" | |
30 | + exit 3 | |
31 | ;; | |
32 | esac | |
33 | diff -dur LVM2.2.02.98.orig/scripts/clvmd_init_red_hat.in LVM2.2.02.98/scripts/clvmd_init_red_hat.in | |
34 | --- LVM2.2.02.98.orig/scripts/clvmd_init_red_hat.in 2012-10-15 16:24:58.000000000 +0200 | |
35 | +++ LVM2.2.02.98/scripts/clvmd_init_red_hat.in 2012-10-25 11:57:52.000000000 +0200 | |
36 | @@ -65,9 +65,8 @@ | |
37 | start() | |
38 | { | |
39 | if ! rh_status_q; then | |
40 | - echo -n "Starting $DAEMON: " | |
41 | + msg_starting "$DAEMON" | |
42 | $DAEMON $CLVMDOPTS || return $? | |
43 | - echo | |
44 | fi | |
45 | ||
46 | # Refresh local cache. | |
47 | @@ -87,7 +86,7 @@ | |
48 | ||
49 | ${lvm_vgscan} > /dev/null 2>&1 | |
50 | ||
51 | - action "Activating VG(s):" ${lvm_vgchange} -aay $LVM_VGS || return $? | |
52 | + run_cmd "Activating VG(s):" ${lvm_vgchange} -aay $LVM_VGS || return $? | |
53 | ||
54 | touch $LOCK_FILE | |
55 | ||
56 | @@ -112,27 +111,23 @@ | |
57 | ||
58 | [ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)" | |
59 | if [ -n "$LVM_VGS" ]; then | |
60 | - action "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $? | |
61 | + run_cmd "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $? | |
62 | fi | |
63 | ||
64 | - action "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $? | |
65 | + run_cmd "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $? | |
66 | ||
67 | # wait half second before we start the waiting loop or we will show | |
68 | # the loop more time than really necessary | |
69 | usleep 500000 | |
70 | ||
71 | # clvmd could take some time to stop | |
72 | - rh_status_q && action "Waiting for $DAEMON to exit:" wait_for_finish | |
73 | + rh_status_q && run_cmd "Waiting for $DAEMON to exit:" wait_for_finish | |
74 | ||
75 | if rh_status_q; then | |
76 | - echo -n "$DAEMON failed to exit" | |
77 | - failure | |
78 | - echo | |
79 | + fail | |
80 | return 1 | |
81 | else | |
82 | - echo -n "$DAEMON terminated" | |
83 | - success | |
84 | - echo | |
85 | + ok | |
86 | fi | |
87 | ||
88 | rm -f $LOCK_FILE | |
89 | @@ -142,7 +137,7 @@ | |
90 | ||
91 | reload() { | |
92 | rh_status_q || exit 7 | |
93 | - action "Reloading $DAEMON configuration: " $DAEMON -R || return $? | |
94 | + run_cmd "Reloading $DAEMON configuration: " $DAEMON -R || return $? | |
95 | } | |
96 | ||
97 | restart() { | |
98 | @@ -153,7 +148,7 @@ | |
99 | ||
100 | # Try to get clvmd to restart itself. This will preserve | |
101 | # exclusive LV locks | |
102 | - action "Restarting $DAEMON: " $DAEMON -S | |
103 | + run_cmd "Restarting $DAEMON: " $DAEMON -S | |
104 | ||
105 | # If that fails then do a normal stop & restart | |
106 | if [ $? != 0 ]; then | |
107 | diff -dur LVM2.2.02.98.orig/scripts/lvm2_monitoring_init_red_hat.in LVM2.2.02.98/scripts/lvm2_monitoring_init_red_hat.in | |
108 | --- LVM2.2.02.98.orig/scripts/lvm2_monitoring_init_red_hat.in 2012-10-15 16:24:58.000000000 +0200 | |
109 | +++ LVM2.2.02.98/scripts/lvm2_monitoring_init_red_hat.in 2012-10-25 11:57:52.000000000 +0200 | |
110 | @@ -1,4 +1,4 @@ | |
111 | -#!/bin/bash | |
112 | +#!/bin/sh | |
113 | # | |
114 | # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved. | |
115 | # | |
116 | @@ -46,12 +46,19 @@ | |
117 | ||
118 | start() | |
119 | { | |
120 | - ret=0 | |
121 | + local ret=0 | |
122 | # TODO do we want to separate out already active groups only? | |
123 | VGSLIST=`$VGS --noheadings -o name --config 'log{command_names=0 prefix=" "}' 2> /dev/null` | |
124 | for vg in $VGSLIST | |
125 | do | |
126 | - action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y --poll y --config 'log{command_names=0 prefix=" "}' $vg || ret=$? | |
127 | + msg_starting "Starting monitoring for VG $vg:"; busy | |
128 | + $VGCHANGE --monitor y --poll y --config 'log{command_names=0 prefix=" "}' $vg | |
129 | + ret=$? | |
130 | + if [ $ret -ne 0 ]; then | |
131 | + fail | |
132 | + return $ret | |
133 | + fi | |
134 | + ok | |
135 | done | |
136 | ||
137 | return $ret | |
138 | @@ -60,7 +67,7 @@ | |
139 | ||
140 | stop() | |
141 | { | |
142 | - ret=0 | |
143 | + local ret=0 | |
144 | # TODO do we want to separate out already active groups only? | |
145 | if test "$WARN" = "1"; then | |
146 | echo "Not stopping monitoring, this is a dangerous operation. Please use force-stop to override." | |
147 | @@ -69,7 +76,14 @@ | |
148 | VGSLIST=`$VGS --noheadings -o name --config 'log{command_names=0 prefix=" "}' 2> /dev/null` | |
149 | for vg in $VGSLIST | |
150 | do | |
151 | - action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n --config 'log{command_names=0 prefix=" "}' $vg || ret=$? | |
152 | + msg_stopping "Stopping monitoring for VG $vg:"; busy | |
153 | + $VGCHANGE --monitor n --config 'log{command_names=0 prefix=" "}' $vg | |
154 | + ret=$? | |
155 | + if [ $ret -ne 0 ]; then | |
156 | + fail | |
157 | + return $ret | |
158 | + fi | |
159 | + ok | |
160 | done | |
161 | return $ret | |
162 | } | |
163 | diff -dur LVM2.2.02.98.orig/scripts/lvm2_monitoring_systemd_red_hat.service.in LVM2.2.02.98/scripts/lvm2_monitoring_systemd_red_hat.service.in | |
164 | --- LVM2.2.02.98.orig/scripts/lvm2_monitoring_systemd_red_hat.service.in 2012-10-15 16:24:58.000000000 +0200 | |
165 | +++ LVM2.2.02.98/scripts/lvm2_monitoring_systemd_red_hat.service.in 2012-10-25 11:57:52.000000000 +0200 | |
166 | @@ -2,7 +2,7 @@ | |
167 | Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling | |
168 | Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8) | |
169 | Requires=dm-event.socket | |
170 | -After=dm-event.socket fedora-storage-init.service fedora-storage-init-late.service lvm2-activation.service lvm2-lvmetad.service | |
171 | +After=dm-event.socket pld-storage-init.service pld-storage-init-late.service lvm2-activation.service lvm2-lvmetad.service | |
172 | Before=local-fs.target | |
173 | DefaultDependencies=no | |
174 | Conflicts=shutdown.target | |
4bdf1a9f JK |
175 | diff -dur LVM2.2.02.98.orig/scripts/blk_availability_systemd_red_hat.service.in LVM2.2.02.98/scripts/blk_availability_systemd_red_hat.service.in |
176 | --- LVM2.2.02.98.orig/scripts/blk_availability_systemd_red_hat.service.in 2012-10-15 16:24:58.000000000 +0200 | |
177 | +++ LVM2.2.02.98/scripts/blk_availability_systemd_red_hat.service.in 2012-10-29 15:38:31.000000000 +0100 | |
178 | @@ -6,7 +6,7 @@ | |
179 | ||
180 | [Service] | |
181 | Type=oneshot | |
182 | -ExecStart=/usr/bin/true | |
183 | +ExecStart=/bin/true | |
184 | ExecStop=@sbindir@/blkdeactivate -u -l wholevg | |
185 | RemainAfterExit=yes | |
186 |