]>
Commit | Line | Data |
---|---|---|
f73ef3b6 ER |
1 | Upstream tracker: https://sourceforge.net/p/lxc/bugs/75/ |
2 | ||
bf6a07ce ER |
3 | the variables get assigned as: |
4 | KVER_MAJOR="3\n# Linux VServer" | |
5 | KVER_MINOR="10\n# Linux VServer" | |
6 | ||
7 | which causes parse errors: | |
8 | ||
9 | Cgroup memory controller: | |
10 | + '[' 3 '#' Linux VServer -ge 3 -a 10 '#' Linux VServer -ge 6 ']' | |
11 | /usr/bin/lxc-checkconfig[98]: [: #: unexpected operator/operand | |
12 | + is_enabled CONFIG_CGROUP_MEM_RES_CTLR | |
13 | ||
14 | in this code: | |
15 | if [ $KVER_MAJOR -ge 3 -a $KVER_MINOR -ge 6 ]; then | |
16 | is_enabled CONFIG_MEMCG | |
17 | else | |
18 | is_enabled CONFIG_CGROUP_MEM_RES_CTLR | |
19 | fi | |
20 | ||
21 | ||
22 | --- | |
23 | $ zgrep '^# Linux' /proc/config.gz | sed -r 's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/' | |
24 | 3 | |
25 | # Linux VServer | |
26 | --- | |
27 | ||
28 | $ zcat /proc/config.gz |grep '^# Linux' | |
29 | --- | |
30 | # Linux/x86_64 3.10.10 Kernel Configuration | |
31 | # Linux VServer | |
32 | --- | |
33 | ||
34 | ||
35 | --- lxc-0.9.0/src/lxc/lxc-checkconfig.in 2013-09-17 12:00:03.486888314 +0300 | |
36 | +++ lxc-0.9.0/lxc-checkconfig 2013-09-17 12:47:12.000000000 +0300 | |
37 | @@ -78,13 +68,13 @@ | |
38 | } | |
39 | ||
40 | CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -1` | |
41 | -KVER_MAJOR=$($GREP '^# Linux' $CONFIG | \ | |
42 | +KVER_MAJOR=$($GREP '^# Linux.*Kernel Configuration' $CONFIG | \ | |
43 | sed -r 's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/') | |
44 | if [ "$KVER_MAJOR" = "2" ]; then | |
45 | -KVER_MINOR=$($GREP '^# Linux' $CONFIG | \ | |
46 | +KVER_MINOR=$($GREP '^# Linux.*Kernel Configuration' $CONFIG | \ | |
47 | sed -r 's/.* 2.6.([0-9]{2}).*/\1/') | |
48 | else | |
49 | -KVER_MINOR=$($GREP '^# Linux' $CONFIG | \ | |
50 | +KVER_MINOR=$($GREP '^# Linux.*Kernel Configuration' $CONFIG | \ | |
51 | sed -r 's/.* [0-9]\.([0-9]{1,3})\.[0-9]{1,3}.*/\1/') | |
52 | fi | |
53 |