]> git.pld-linux.org Git - packages/rc-scripts.git/blob - rc-scripts-svn.patch
- rel 3; fix errors about init crypt
[packages/rc-scripts.git] / rc-scripts-svn.patch
1 Index: rc.d/rc.sysinit
2 ===================================================================
3 --- rc.d/rc.sysinit     (wersja 11895)
4 +++ rc.d/rc.sysinit     (kopia robocza)
5 @@ -272,13 +272,17 @@
6  
7         # cgroup/cpuset support
8         if grep -q cgroup /proc/filesystems 2>/dev/null ; then
9 -               # creating is more convenient than artificial conflict with older udev
10 -               mkdir -p /dev/cgroup
11 -               # mount w/o options enables all available cgroup subsystems
12 -               modprobe -s blk-cgroup 2> /dev/null
13 -               mount -n -t cgroup none /dev/cgroup
14 +               if ! grep -q cgroup /etc/fstab 2>/dev/null ; then
15 +                       # creating is more convenient than artificial conflict with older udev
16 +                       mkdir -p /dev/cgroup
17 +                       # mount w/o options enables all available cgroup subsystems
18 +                       modprobe -s blk-cgroup 2> /dev/null
19 +                       mount -n -t cgroup none /dev/cgroup
20 +               fi
21         elif grep -q cpuset /proc/filesystems 2>/dev/null ; then
22 -               mount -n -t cpuset none /dev/cpuset
23 +               if ! grep -q cpuset /etc/fstab 2>/dev/null ; then
24 +                       mount -n -t cpuset none /dev/cpuset
25 +               fi
26         fi
27  
28         # Configure Linux kernel (initial configuration, some required modules still
29 @@ -335,6 +339,7 @@
30                 TIME_SETUP_DELAYED=yes
31         fi
32  
33 +       delay_cryptsetup=0
34         if [ -f /etc/crypttab ] && ! is_empty_file /etc/crypttab; then
35                 # XXX might need modules dep
36                 # Device mapper & related initialization
37 @@ -342,10 +347,11 @@
38                         modprobe dm-mod
39                 fi
40  
41 -               # but should do this before swapon?
42                 . /etc/rc.d/init.d/cryptsetup
43                 show "Starting disk encryption"
44 -               init_crypto 0 && ok || fail
45 +               init_crypto 0
46 +               delay_cryptsetup=$?
47 +               [ $delay_cryptsetup = 0 ] && ok || fail
48         fi
49  
50         # Start up swapping
51 @@ -461,10 +467,11 @@
52                 done
53         fi
54  
55 -       if [ -f /etc/crypttab ] && ! is_empty_file /etc/crypttab; then
56 -               # XXX, this must be probably done after random is initialized from /var/run/random-seed
57 +       if [ "$delay_cryptsetup" != 0 ]; then
58                 show "Starting disk encryption using the RNG"
59 -               init_crypto 1 && ok || fail
60 +               init_crypto 1
61 +               delay_cryptsetup=$?
62 +               [ $delay_cryptsetup = 0 ] && ok || fail
63         fi
64  else
65         # Start logging console output since we have all /dev stuff setup
66 @@ -669,6 +676,13 @@
67                 fi
68         fi
69  
70 +       if [ "$delay_cryptsetup" != 0 ]; then
71 +               show "Starting disk encryption"
72 +               init_crypto 1
73 +               delay_cryptsetup=$?
74 +               [ $delay_cryptsetup = 0 ] && ok || fail
75 +       fi
76 +
77         # Add raid devices
78         if [ -x /sbin/mdadm -a -f /etc/mdadm.conf ] || [ -f /etc/raidtab ]; then
79                 modprobe -s md >/dev/null 2>&1
This page took 0.085283 seconds and 4 git commands to generate.