1 |
commit: 8c7c438aca74983f42d52edb990f0a7e8786ff4c |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 5 01:10:39 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 5 01:10:39 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c7c438a |
7 |
|
8 |
sys-fs/lvm2: runscript: fix indentation |
9 |
|
10 |
Package-Manager: Portage-2.3.44, Repoman-2.3.10 |
11 |
|
12 |
sys-fs/lvm2/files/lvm.rc-2.02.172 | 56 ++++++++++++++++++++------------------- |
13 |
1 file changed, 29 insertions(+), 27 deletions(-) |
14 |
|
15 |
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.172 b/sys-fs/lvm2/files/lvm.rc-2.02.172 |
16 |
index deaf08959d3..c3f1f08f399 100644 |
17 |
--- a/sys-fs/lvm2/files/lvm.rc-2.02.172 |
18 |
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.172 |
19 |
@@ -23,6 +23,7 @@ _need_lvmlockd() |
20 |
[ ! -x "${lvm_path}" ] && return 1 |
21 |
${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1' |
22 |
} |
23 |
+ |
24 |
depend() { |
25 |
before checkfs fsck |
26 |
after modules device-mapper |
27 |
@@ -112,36 +113,37 @@ stop() { |
28 |
eerror "Cannot find lvm binary in /sbin or /bin!" |
29 |
return 1 |
30 |
fi |
31 |
-# Stop LVM2 |
32 |
-if [ -x /sbin/vgs ] && \ |
33 |
- [ -x /sbin/vgchange ] && \ |
34 |
- [ -x /sbin/lvchange ] && \ |
35 |
- [ -f /etc/lvmtab -o -d /etc/lvm ] && \ |
36 |
- [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ] |
37 |
-then |
38 |
- einfo "Shutting down the Logical Volume Manager" |
39 |
|
40 |
- VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null) |
41 |
+ # Stop LVM2 |
42 |
+ if [ -x /sbin/vgs ] && \ |
43 |
+ [ -x /sbin/vgchange ] && \ |
44 |
+ [ -x /sbin/lvchange ] && \ |
45 |
+ [ -f /etc/lvmtab -o -d /etc/lvm ] && \ |
46 |
+ [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ] |
47 |
+ then |
48 |
+ einfo "Shutting down the Logical Volume Manager" |
49 |
|
50 |
- if [ "$VGS" ] |
51 |
- then |
52 |
- local _ending="eend" |
53 |
- [ "$RC_RUNLEVEL" = shutdown ] && _ending="ewend" |
54 |
- ebegin " Shutting Down LVs & VGs" |
55 |
- #still echo stderr for debugging |
56 |
- lvm_commands="#!${lvm_path}\n" |
57 |
- # Extra PV find pass because some devices might not have been available until very recently |
58 |
- lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n" |
59 |
- # Now make the nodes |
60 |
- lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n" |
61 |
- # Order of this is important, have to work around dash and LVM readline |
62 |
- printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null |
63 |
- ${_ending} $? "Failed (possibly some LVs still needed for /usr or root)" |
64 |
- fi |
65 |
+ VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null) |
66 |
+ |
67 |
+ if [ "$VGS" ] |
68 |
+ then |
69 |
+ local _ending="eend" |
70 |
+ [ "$RC_RUNLEVEL" = shutdown ] && _ending="ewend" |
71 |
+ ebegin " Shutting Down LVs & VGs" |
72 |
+ #still echo stderr for debugging |
73 |
+ lvm_commands="#!${lvm_path}\n" |
74 |
+ # Extra PV find pass because some devices might not have been available until very recently |
75 |
+ lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n" |
76 |
+ # Now make the nodes |
77 |
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n" |
78 |
+ # Order of this is important, have to work around dash and LVM readline |
79 |
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null |
80 |
+ ${_ending} $? "Failed (possibly some LVs still needed for /usr or root)" |
81 |
+ fi |
82 |
|
83 |
- einfo "Finished shutting down the Logical Volume Manager" |
84 |
- return 0 |
85 |
-fi |
86 |
+ einfo "Finished shutting down the Logical Volume Manager" |
87 |
+ return 0 |
88 |
+ fi |
89 |
} |
90 |
|
91 |
# vim:ts=4 |