]> git.pld-linux.org Git - packages/geninitrd.git/blob - geninitrd-svn.patch
- rel 6; don't resolve symlink for luks device nodes
[packages/geninitrd.git] / geninitrd-svn.patch
1 Index: geninitrd
2 ===================================================================
3 --- geninitrd   (wersja 12174)
4 +++ geninitrd   (kopia robocza)
5 @@ -772,9 +772,9 @@
6                         device=$rootdev
7                 fi
8  
9 -               [ -n "$ROOTFSFLAG" ] && ROOTFSFLAGS="-o $ROOTFSFLAGS"
10 +               [ -n "$ROOTFSFLAGS" ] && ROOTFSFLAGS="-o $ROOTFSFLAGS"
11  
12 -               mount -t $rootfs -r $device $ROOTFSFLAGS /newroot
13 +               mount -t $rootfs -r $device $ROOTFSFLAGS /newroot || echo "Mount of rootfs failed."
14                 init="$(echo "$CMDLINE" | busybox awk '/init=\// { gsub(/.*init=/,NIL,$0); gsub(/ .*/,NIL,$0); print }')"
15                 if [ -z "$init" -o ! -x "/newroot$init" ]; then
16                         init=/sbin/init
17 Index: geninitrd
18 ===================================================================
19 --- geninitrd   (wersja 12182)
20 +++ geninitrd   (kopia robocza)
21 @@ -709,7 +709,7 @@
22                         rootnr="$(busybox awk -v rootnode="${ROOT##/dev/}" '$4 == rootnode { print 256 * $1 + $2 }' /proc/partitions)"
23                         # fallback to ls
24                         if [ -z "$rootnr" ]; then
25 -                               rootnr="$(busybox ls -lL ${ROOT} | awk '{if (/^b/) { print 256 * $3 + $4; }}')"
26 +                               rootnr="$(busybox ls -lL ${ROOT} | busybox awk '{if (/^b/) { print 256 * $3 + $4; }}')"
27                         fi
28                         if [ -n "$rootnr" ]; then
29                                 echo "$rootnr" > /proc/sys/kernel/real-root-dev
30 Index: mod-sata.sh
31 ===================================================================
32 --- mod-sata.sh (wersja 12194)
33 +++ mod-sata.sh (kopia robocza)
34 @@ -17,7 +17,7 @@
35  
36  # private until only mod-sata uses the function
37  find_modules_by_class() {
38 -       local class=$1
39 +       local req_class=$1
40  
41         # no pcimap, nothing to lookup from
42         if [ ! -f "$pcimap" ]; then
43 @@ -28,10 +28,12 @@
44                 return
45         fi
46  
47 -       set -- $($lspci -n | awk -vclass=$class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
48 +       set -- $($lspci -n | awk -vclass=$req_class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
49  
50         local PCI_ANY_ID=0x0000ffff pci_module vendor device subvendor subdevice class class_mask driver_data
51         while read pci_module vendor device subvendor subdevice class class_mask driver_data; do
52 +               # match class
53 +               [ "$(($req_class & $class_mask))" = "$class" ] || continue
54                 # match vendor
55                 [ "$1" = "$vendor" ] || continue
56                 # match device, allow PCI_ANY_ID
57 Index: geninitrd
58 ===================================================================
59 --- geninitrd   (wersja 12198)
60 +++ geninitrd   (kopia robocza)
61 @@ -467,7 +467,7 @@
62                 devpath=$(dm_node "$devpath")
63         fi
64  
65 -       if [ -L "$devpath" ] && ! is_lvm "$devpath"; then
66 +       if [ -L "$devpath" ] && ! is_lvm "$devpath" && ! is_luks "$devpath"; then
67                 # sanitize things like:
68                 # /dev/block/104:2 -> /dev/cciss/c0d0p2
69                 devpath=$(readlink -f "$devpath")
This page took 0.036518 seconds and 3 git commands to generate.