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
341c9718
Commit
341c9718
authored
Dec 06, 2013
by
Dwight Engen
Committed by
Stéphane Graber
Dec 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oracle: fix chcon warning when selinux disabled
Signed-off-by:
Dwight Engen
<
dwight.engen@oracle.com
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
64994c03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lxc-oracle.in
templates/lxc-oracle.in
+11
-2
No files found.
templates/lxc-oracle.in
View file @
341c9718
...
...
@@ -46,6 +46,15 @@ is_btrfs_subvolume()
return
1
}
can_chcon
()
{
if
which
chcon
>
/dev/null 2>&1
;
then
selinuxenabled
>
/dev/null 2>&1
return
$?
fi
return
1
}
# fix up the container_rootfs
container_rootfs_configure
()
{
...
...
@@ -312,7 +321,7 @@ EOF
if
[
$container_rootfs
!=
"/"
-a
-d
$dev_path
]
;
then
rm
-rf
$dev_path
mkdir
-p
$dev_path
if
which
chcon
>
/dev/null 2>&1
;
then
if
can_chcon
;
then
# ensure symlinks created in /dev have the right context
chcon
-t
device_t
$dev_path
fi
...
...
@@ -333,7 +342,7 @@ EOF
mknod
-m
600
$dev_path
/initctl p
# set selinux labels same as host
if
which
chcon
>
/dev/null 2>&1
;
then
if
can_chcon
;
then
for
node
in
null zero random urandom pts shm
\
tty
tty0 tty1 tty2 tty3 tty4 full
;
do
...
...
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