Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
3a61be8e
Commit
3a61be8e
authored
Sep 29, 2016
by
Christian Brauner
Committed by
Stéphane Graber
Oct 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: lxc-checkconfig conditionalize devpts check
Only check for DEVPTS_MULTIPLE_INSTANCES on kernels < 4.7. Signed-off-by:
Christian Brauner
<
christian.brauner@canonical.com
>
parent
51a43951
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
lxc-checkconfig.in
src/lxc/tools/lxc-checkconfig.in
+13
-10
No files found.
src/lxc/tools/lxc-checkconfig.in
View file @
3a61be8e
...
@@ -72,6 +72,16 @@ if gunzip -tq < $CONFIG 2>/dev/null; then
...
@@ -72,6 +72,16 @@ if gunzip -tq < $CONFIG 2>/dev/null; then
CAT
=
"zcat"
CAT
=
"zcat"
fi
fi
KVER_MAJOR
=
$(
$CAT
$CONFIG
|
grep
'^# Linux.*Kernel Configuration'
|
\
sed
-r
's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/'
)
if
[
"
$KVER_MAJOR
"
=
"2"
]
;
then
KVER_MINOR
=
$(
$CAT
$CONFIG
|
grep
'^# Linux.*Kernel Configuration'
|
\
sed
-r
's/.* 2.6.([0-9]{2}).*/\1/'
)
else
KVER_MINOR
=
$(
$CAT
$CONFIG
|
grep
'^# Linux.*Kernel Configuration'
|
\
sed
-r
's/.* [0-9]\.([0-9]{1,3})\.[0-9]{1,3}.*/\1/'
)
fi
echo
"--- Namespaces ---"
echo
"--- Namespaces ---"
echo
-n
"Namespaces: "
&&
is_enabled CONFIG_NAMESPACES
yes
echo
-n
"Namespaces: "
&&
is_enabled CONFIG_NAMESPACES
yes
echo
-n
"Utsname namespace: "
&&
is_enabled CONFIG_UTS_NS
echo
-n
"Utsname namespace: "
&&
is_enabled CONFIG_UTS_NS
...
@@ -79,7 +89,9 @@ echo -n "Ipc namespace: " && is_enabled CONFIG_IPC_NS yes
...
@@ -79,7 +89,9 @@ echo -n "Ipc namespace: " && is_enabled CONFIG_IPC_NS yes
echo
-n
"Pid namespace: "
&&
is_enabled CONFIG_PID_NS
yes
echo
-n
"Pid namespace: "
&&
is_enabled CONFIG_PID_NS
yes
echo
-n
"User namespace: "
&&
is_enabled CONFIG_USER_NS
echo
-n
"User namespace: "
&&
is_enabled CONFIG_USER_NS
echo
-n
"Network namespace: "
&&
is_enabled CONFIG_NET_NS
echo
-n
"Network namespace: "
&&
is_enabled CONFIG_NET_NS
echo
-n
"Multiple /dev/pts instances: "
&&
is_enabled DEVPTS_MULTIPLE_INSTANCES
if
([
$KVER_MAJOR
-lt
4
])
||
([
$KVER_MAJOR
-eq
4
]
&&
[
$KVER_MINOR
-lt
7
])
;
then
echo
-n
"Multiple /dev/pts instances: "
&&
is_enabled DEVPTS_MULTIPLE_INSTANCES
fi
echo
echo
echo
"--- Control groups ---"
echo
"--- Control groups ---"
...
@@ -89,15 +101,6 @@ print_cgroups() {
...
@@ -89,15 +101,6 @@ print_cgroups() {
}
}
CGROUP_MNT_PATH
=
`
print_cgroups cgroup /proc/self/mounts |
head
-n
1
`
CGROUP_MNT_PATH
=
`
print_cgroups cgroup /proc/self/mounts |
head
-n
1
`
KVER_MAJOR
=
$(
$CAT
$CONFIG
|
grep
'^# Linux.*Kernel Configuration'
|
\
sed
-r
's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/'
)
if
[
"
$KVER_MAJOR
"
=
"2"
]
;
then
KVER_MINOR
=
$(
$CAT
$CONFIG
|
grep
'^# Linux.*Kernel Configuration'
|
\
sed
-r
's/.* 2.6.([0-9]{2}).*/\1/'
)
else
KVER_MINOR
=
$(
$CAT
$CONFIG
|
grep
'^# Linux.*Kernel Configuration'
|
\
sed
-r
's/.* [0-9]\.([0-9]{1,3})\.[0-9]{1,3}.*/\1/'
)
fi
echo
-n
"Cgroup: "
&&
is_enabled CONFIG_CGROUPS
yes
echo
-n
"Cgroup: "
&&
is_enabled CONFIG_CGROUPS
yes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment