Lines 1-8
Link Here
|
1 |
# /lib/rcscripts/addons/lvm-start.sh |
1 |
# /lib/rcscripts/addons/lvm-start.sh |
2 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-start.sh-2.02.95,v 1.1 2012/03/27 03:20:56 robbat2 Exp $ |
2 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-start.sh-2.02.95,v 1.1 2012/03/27 03:20:56 robbat2 Exp $ |
3 |
|
3 |
|
4 |
config='global { locking_dir = "/dev/.lvm" }' |
|
|
5 |
|
6 |
dm_in_proc() { |
4 |
dm_in_proc() { |
7 |
local retval=0 |
5 |
local retval=0 |
8 |
for x in devices misc ; do |
6 |
for x in devices misc ; do |
Lines 28-42
Link Here
|
28 |
if [ -d /proc/lvm ] || dm_in_proc ; then |
26 |
if [ -d /proc/lvm ] || dm_in_proc ; then |
29 |
ebegin "Setting up the Logical Volume Manager" |
27 |
ebegin "Setting up the Logical Volume Manager" |
30 |
#still echo stderr for debugging |
28 |
#still echo stderr for debugging |
31 |
lvm_commands="#! ${lvm_path} --config '${config}'\n" |
29 |
lvm_commands="#! ${lvm_path}\n" |
32 |
# Extra PV find pass because some devices might not have been available until very recently |
30 |
# devtmpfs (needed by udev) makes scanning unnecessary |
33 |
lvm_commands="${lvm_commands}pvscan\n" |
31 |
if ! mountinfo -q -f devtmpfs /dev ; then |
34 |
# Now make the nodes |
32 |
# Extra PV find pass because some devices might not have been available until very recently |
35 |
lvm_commands="${lvm_commands}vgscan --mknodes\n" |
33 |
lvm_commands="${lvm_commands}pvscan\n" |
|
|
34 |
# Now make the nodes |
35 |
lvm_commands="${lvm_commands}vgscan --mknodes\n" |
36 |
fi |
36 |
# And turn them on! |
37 |
# And turn them on! |
37 |
lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n" |
38 |
lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n" |
38 |
# Order of this is important, have to work around dash and LVM readline |
39 |
# Order of this is important, have to work around dash and LVM readline |
39 |
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null |
40 |
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 >/dev/null |
40 |
eend $? "Failed to setup the LVM" |
41 |
eend $? "Failed to setup the LVM" |
41 |
fi |
42 |
fi |
42 |
else |
43 |
else |