Skip to content

Commit

Permalink
Merge pull request #165 from endlessm/T35498-kolibri-data-chown
Browse files Browse the repository at this point in the history
image: Chown Kolibri and Endless Key data
  • Loading branch information
wjt committed Jun 17, 2024
2 parents 27ff146 + 2f47bc9 commit 3d3f36d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
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

0 comments on commit 3d3f36d

Please sign in to comment.