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
e4c0cf92
Commit
e4c0cf92
authored
Oct 13, 2011
by
Frederic Crozat
Committed by
Daniel Lezcano
Oct 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle kernel 3.x in lxc-checkconfig
Make sure to correctly detect kernel 3.x for file capabilities. Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
b031f0d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
lxc-checkconfig.in
src/lxc/lxc-checkconfig.in
+13
-4
No files found.
src/lxc/lxc-checkconfig.in
View file @
e4c0cf92
...
...
@@ -88,12 +88,21 @@ echo "--- Misc ---"
echo
-n
"Veth pair device: "
&&
is_enabled CONFIG_VETH
echo
-n
"Macvlan: "
&&
is_enabled CONFIG_MACVLAN
echo
-n
"Vlan: "
&&
is_enabled CONFIG_VLAN_8021Q
KVER_MAJOR
=
$(
$GREP
'^# Linux'
$CONFIG
|
\
sed
-r
's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/'
)
if
[[
$KVER_MAJOR
==
2
]]
;
then
KVER_MINOR
=
$(
$GREP
'^# Linux'
$CONFIG
|
\
sed
-r
's/.*2.6.([0-9]{2}).*/\1/'
)
sed
-r
's/.* 2.6.([0-9]{2}).*/\1/'
)
else
KVER_MINOR
=
$(
$GREP
'^# Linux'
$CONFIG
|
\
sed
-r
's/.* [0-9]\.([0-9]{1,3})\.[0-9]{1,3}.*/\1/'
)
fi
echo
-n
"File capabilities: "
&&
[[
${
KVER_MINOR
}
< 33
]]
&&
is_enabled CONFIG_SECURITY_FILE_CAPABILITIES
||
[[
${
KVER_MINOR
}
>
32
]]
&&
$SETCOLOR_SUCCESS
&&
echo
-e
"enabled"
&&
$SETCOLOR_NORMAL
(
[[
${
KVER_MAJOR
}
==
2
&&
${
KVER_MINOR
}
< 33
]]
&&
is_enabled CONFIG_SECURITY_FILE_CAPABILITIES
)
||
(
[[
(
${
KVER_MAJOR
}
==
2
&&
${
KVER_MINOR
}
>
32
)
||
${
KVER_MAJOR
}
>
2
]]
&&
$SETCOLOR_SUCCESS
&&
echo
-e
"enabled"
&&
$SETCOLOR_NORMAL
)
echo
echo
"Note : Before booting a new kernel, you can check its configuration"
...
...
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