Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image: Chown Kolibri and Endless Key data #165

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ hooks_add =
62-kolibri-automatic-provision
62-kolibri-options
63-icon-grid
63-kolibri-chown.chroot
70-flatpak-appstream-catalog
70-flatpak-manifest
70-ostree-manifest
Expand Down
6 changes: 6 additions & 0 deletions hooks/image/53-ek-content-preload
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,9 @@ fi
# unique Facility ID.
# <https://kolibri.readthedocs.io/en/latest/install/provision.html#prepare-the-kolibri-folder-for-copying>
(echo yes; echo yes) | kolibri manage --skip-update deprovision

# Chown all the files to the kolibri user. This also happens at runtime
# via the endless-key.conf tmpfiles.d configuration.
kolibri_uid=$(ostree_uid kolibri)
kolibri_gid=$(ostree_gid kolibri)
chown -R "${kolibri_uid}:${kolibri_gid}" "${OSTREE_VAR}"/lib/endless-key
5 changes: 5 additions & 0 deletions hooks/image/63-kolibri-chown.chroot
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Chown all Kolibri data files to the kolibri user. This also happens at
# runtime via the eos-kolibri.conf tmpfiles.d configuration.
if [ -d /var/lib/kolibri ]; then
chown -R kolibri:kolibri /var/lib/kolibri
fi
Loading