Create a sentinel file to avoid running the fix every time (#1025)

* Create a sentinel file to avoid running the fix every time

This file can also be created by the user to skip this fix if they so
desire. For example, they may have files owned by some other user and
they don't want to mess it up. In that case they can run a similar
script themselves, but with additional logic.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Bump version

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis 2024-09-04 09:23:02 +03:00 committed by GitHub
parent 15f79a7845
commit 9c5aa63f2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
packages:
- name: "kairos-overlay-files"
category: "static"
version: "1.1.47"
version: "1.1.48"

View File

@ -2,6 +2,7 @@ name: "Fix home directory permissions (kairos issue #2797)"
stages:
initramfs.after:
- name: "Fix permissions"
if: '[ ! -f "/usr/local/.kairos/skip-home-directory-ownership-fix" ]'
commands:
- |
# Iterate over users in /etc/passwd and chown their directories
@ -13,3 +14,4 @@ stages:
echo "Directory $homedir does not exist for user $user"
fi
done
echo "https://github.com/kairos-io/kairos/issues/2843" > /usr/local/.kairos/skip-home-directory-ownership-fix