@@ -510,7 +510,7 @@ get_pr_artifact_url() {
510
510
if [ -z " ${commit_id} " ]; then
511
511
fatal " Installing PR builds requires GITHUB_TOKEN with k3s-io/k3s repo permissions"
512
512
fi
513
-
513
+
514
514
# GET request to the GitHub API to retrieve the Build workflow associated with the commit
515
515
run_id=$( curl -s -H " Authorization: Bearer ${GITHUB_TOKEN} " " ${github_api_url} /commits/${commit_id} /check-runs?check_name=build%20%2F%20Build" | jq -r ' [.check_runs | sort_by(.id) | .[].details_url | split("/")[7]] | last' )
516
516
@@ -626,7 +626,7 @@ setup_selinux() {
626
626
install_selinux_rpm ${rpm_site} ${rpm_channel} ${rpm_target} ${rpm_site_infix}
627
627
628
628
policy_error=fatal
629
- if [ " $INSTALL_K3S_SELINUX_WARN " = true ] || [ " ${ID_LIKE:- } " = coreos ] ||
629
+ if [ " $INSTALL_K3S_SELINUX_WARN " = true ] || [ " ${ID_LIKE:- } " = coreos ] ||
630
630
[ " ${VARIANT_ID:- } " = coreos ] || [ " ${VARIANT_ID:- } " = iot ]; then
631
631
policy_error=warn
632
632
fi
@@ -646,7 +646,7 @@ setup_selinux() {
646
646
}
647
647
648
648
install_selinux_rpm () {
649
- if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] ||
649
+ if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] ||
650
650
[ -r /etc/fedora-release ] || [ -r /etc/system-release ] || [ " ${ID_LIKE%% [ ]* } " = " suse" ]; then
651
651
repodir=/etc/yum.repos.d
652
652
if [ -d /etc/zypp/repos.d ]; then
@@ -775,7 +775,7 @@ create_killall() {
775
775
info " Creating killall script ${KILLALL_K3S_SH} "
776
776
$SUDO tee ${KILLALL_K3S_SH} > /dev/null << \EOF
777
777
#!/bin/sh
778
- [ $( id -u) -eq 0 ] || exec sudo $0 $@
778
+ [ $( id -u) -eq 0 ] || exec sudo --preserve-env=K3S_DATA_DIR $0 $@
779
779
780
780
K3S_DATA_DIR=${K3S_DATA_DIR:-/ var/ lib/ rancher/ k3s}
781
781
@@ -877,7 +877,7 @@ create_uninstall() {
877
877
$SUDO tee ${UNINSTALL_K3S_SH} > /dev/null << EOF
878
878
#!/bin/sh
879
879
set -x
880
- [ \$ (id -u) -eq 0 ] || exec sudo \$ 0 \$ @
880
+ [ \$ (id -u) -eq 0 ] || exec sudo --preserve-env=K3S_DATA_DIR \$ 0 \$ @
881
881
882
882
K3S_DATA_DIR=\$ {K3S_DATA_DIR:-/var/lib/rancher/k3s}
883
883
0 commit comments