Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
3fc68036
Unverified
Commit
3fc68036
authored
Oct 29, 2020
by
Chris Kim
Committed by
GitHub
Oct 29, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2457 from Oats87/fix-rpm-install-1.19
[1.19 Backport] Support k3s-selinux rpm install more effectively
parents
f8a4547b
851767b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
install.sh
install.sh
+15
-5
No files found.
install.sh
View file @
3fc68036
...
@@ -469,11 +469,21 @@ install_selinux_rpm() {
...
@@ -469,11 +469,21 @@ install_selinux_rpm() {
if
[
-r
/etc/redhat-release
]
||
[
-r
/etc/centos-release
]
||
[
-r
/etc/oracle-release
]
;
then
if
[
-r
/etc/redhat-release
]
||
[
-r
/etc/centos-release
]
||
[
-r
/etc/oracle-release
]
;
then
dist_version
=
"
$(
.
/etc/os-release
&&
echo
"
$VERSION_ID
"
)
"
dist_version
=
"
$(
.
/etc/os-release
&&
echo
"
$VERSION_ID
"
)
"
maj_ver
=
$(
echo
"
$dist_version
"
|
sed
-E
-e
"s/^([0-9]+)
\.
?[0-9]*
$/
\1
/"
)
maj_ver
=
$(
echo
"
$dist_version
"
|
sed
-E
-e
"s/^([0-9]+)
\.
?[0-9]*
$/
\1
/"
)
if
[
-r
/etc/redhat-release
]
&&
[
"
${
maj_ver
}
"
=
"7"
]
;
then
if
[
-r
/etc/redhat-release
]
;
then
yum
-y
install
yum-utils
case
${
maj_ver
}
in
yum-config-manager
--enable
rhel-7-server-extras-rpms
7
)
$SUDO
yum
-y
install
yum-utils
$SUDO
yum-config-manager
--enable
rhel-7-server-extras-rpms
;;
8
)
:
;;
*
)
return
;;
esac
fi
fi
cat
<<-
EOF
>"/etc/yum.repos.d/rancher-k3s-common-
${
INSTALL_K3S_CHANNEL
}
.repo"
$SUDO
tee
/etc/yum.repos.d/rancher-k3s-common-
${
INSTALL_K3S_CHANNEL
}
.repo
>
/dev/null
<<
EOF
[rancher-k3s-common-
${
INSTALL_K3S_CHANNEL
}
]
[rancher-k3s-common-
${
INSTALL_K3S_CHANNEL
}
]
name=Rancher K3s Common (
${
INSTALL_K3S_CHANNEL
}
)
name=Rancher K3s Common (
${
INSTALL_K3S_CHANNEL
}
)
baseurl=https://
${
1
}
/k3s/
${
INSTALL_K3S_CHANNEL
}
/common/centos/
${
maj_ver
}
/noarch
baseurl=https://
${
1
}
/k3s/
${
INSTALL_K3S_CHANNEL
}
/common/centos/
${
maj_ver
}
/noarch
...
@@ -481,7 +491,7 @@ enabled=1
...
@@ -481,7 +491,7 @@ enabled=1
gpgcheck=1
gpgcheck=1
gpgkey=https://
${
1
}
/public.key
gpgkey=https://
${
1
}
/public.key
EOF
EOF
yum
-y
install
"k3s-selinux"
$SUDO
yum
-y
install
"k3s-selinux"
fi
fi
return
return
}
}
...
...
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