Skip to content
Snippets Groups Projects
Verified Commit 5f19288d authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

fix(system-upgrades): Fix path confusion for selinux module

Since the secrets path is only available inside the container, but the
systemd-run command is executed outside the container, it can't access
the secret path, therefore the file needs to be copied.
parent 294f1a22
No related branches found
No related tags found
No related merge requests found
...@@ -24,8 +24,9 @@ stringData: ...@@ -24,8 +24,9 @@ stringData:
secrets="$(dirname $0)" secrets="$(dirname $0)"
semodule_dir="$(mktemp -d)" semodule_dir="$(mktemp -d)"
cp "${secrets}/iscsid_hotfix.te" "${semodule_dir}/iscsid_hotfix.te"
systemd-run --same-dir --wait --collect --service-type=exec dnf install -y selinux-policy-devel systemd-run --same-dir --wait --collect --service-type=exec dnf install -y selinux-policy-devel
systemd-run --same-dir --wait --collect --service-type=exec checkmodule -M -m -o "${semodule_dir}/iscsid_hotfix.mod" "$secrets/iscsid_hotfix.te" systemd-run --same-dir --wait --collect --service-type=exec checkmodule -M -m -o "${semodule_dir}/iscsid_hotfix.mod" "${semodule_dir}/iscsid_hotfix.te"
systemd-run --same-dir --wait --collect --service-type=exec semodule_package -o "${semodule_dir}/iscsid_hotfix.pp" "${semodule_dir}/iscsid_hotfix.mod" systemd-run --same-dir --wait --collect --service-type=exec semodule_package -o "${semodule_dir}/iscsid_hotfix.pp" "${semodule_dir}/iscsid_hotfix.mod"
systemd-run --same-dir --wait --collect --service-type=exec semodule -i "${semodule_dir}/iscsid_hotfix.pp" systemd-run --same-dir --wait --collect --service-type=exec semodule -i "${semodule_dir}/iscsid_hotfix.pp"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment