Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/lvm2/files: lvm2-2.02.56-lvm2create_initrd.patch
Date: Sat, 26 Dec 2009 01:57:45
Message-Id: E1NOLuX-0006wL-RW@stork.gentoo.org
1 robbat2 09/12/26 01:57:41
2
3 Added: lvm2-2.02.56-lvm2create_initrd.patch
4 Log:
5 Bug #296198 redux: package in the contrib lvm2create_initrd script after patching it for users that have non-genkernel initrds.
6 (Portage version: 2.2_rc58/cvs/Linux x86_64, RepoMan options: --force)
7
8 Revision Changes Path
9 1.1 sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch?rev=1.1&content-type=text/plain
13
14 Index: lvm2-2.02.56-lvm2create_initrd.patch
15 ===================================================================
16 --- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000
17 +++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000
18 @@ -54,7 +54,9 @@
19 DEVRAM=/tmp/initrd.$$
20
21 # set defaults
22 -BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"}
23 +LVM=`which lvm.static`
24 +LVM=${LVM:-"`which lvm`"}
25 +BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"}
26 BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"}
27 BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"}
28 MAKEDEV=${MAKEDEV:-"debian"}
29 @@ -119,6 +121,10 @@
30 echo "$PRE Mounting /proc"
31 mount -t proc none /proc
32
33 +# We need /sys for lvm
34 +echo "$PRE Mounting /sys"
35 +mount -t sysfs sysfs /sys
36 +
37 # plug in modules listed in /etc/modules
38 if [ -f /etc/modules ]; then
39 echo -n "$PRE plugging in kernel modules:"
40 @@ -179,26 +185,29 @@
41 # run a shell if we're passed lvm2rescue on commandline
42 grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1
43 if [ $? -eq 0 ]; then
44 - lvm vgchange --ignorelockingfailure -P -a y
45 + $LVM vgchange --ignorelockingfailure -P -a y
46 do_shell
47 else
48 - lvm vgchange --ignorelockingfailure -a y
49 + $LVM vgchange --ignorelockingfailure -a y
50 fi
51
52 echo "$PRE Mounting root filesystem $rootvol ro"
53 mkdir /rootvol
54 if ! mount -t auto -o ro $rootvol /rootvol; then
55 - echo "\t*FAILED*";
56 + echo "\t*FAILED TRYING TO MOUNT ROOTVOL*";
57 do_shell
58 fi
59
60 echo "$PRE Umounting /proc"
61 umount /proc
62
63 +echo "$PRE Umounting /sys"
64 +umount /sys
65 +
66 echo "$PRE Changing roots"
67 cd /rootvol
68 if ! pivot_root . initrd ; then
69 - echo "\t*FAILED*"
70 + echo "\t*FAILED PIVOT TO NEW ROOT*"
71 do_shell
72 fi
73
74 @@ -356,7 +365,7 @@
75 fi
76
77 verbose "creating basic set of directories in $TMPMNT"
78 -(cd $TMPMNT; mkdir bin dev etc lib proc sbin var)
79 +(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var)
80 if [ $? -ne 0 ]; then
81 echo "$cmd -- ERROR creating directories in $TMPMNT"
82 cleanup 1
83 @@ -499,4 +508,3 @@
84 FINALTXT
85
86 cleanup 0
87 -