Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:PowerPC
lxc
lxc-checkconfig-kernel-3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lxc-checkconfig-kernel-3.patch of Package lxc
From 5a4d96d1fd95719ddeb462fff45dbbc7cbbee3df Mon Sep 17 00:00:00 2001 From: Frederic Crozat <fcrozat@suse.com> Date: Thu, 13 Oct 2011 11:26:56 +0200 Subject: [PATCH] handle kernel 3.x in lxc-checkconfig Make sure to correctly detect kernel 3.x for file capabilities. --- src/lxc/lxc-checkconfig.in | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxc-checkconfig.in b/src/lxc/lxc-checkconfig.in index 5dcf3a4..c2c64ba 100755 --- a/src/lxc/lxc-checkconfig.in +++ b/src/lxc/lxc-checkconfig.in @@ -83,12 +83,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" -- 1.7.3.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor