summaryrefslogtreecommitdiff
path: root/raveos-calamares-theme
diff options
context:
space:
mode:
Diffstat (limited to 'raveos-calamares-theme')
-rw-r--r--raveos-calamares-theme/PKGBUILD5
-rwxr-xr-xraveos-calamares-theme/etc/calamares/modules/raveos-chown-homes.sh29
-rw-r--r--raveos-calamares-theme/etc/calamares/modules/shellprocess-final.conf2
3 files changed, 34 insertions, 2 deletions
diff --git a/raveos-calamares-theme/PKGBUILD b/raveos-calamares-theme/PKGBUILD
index 67a21fe..54a6325 100644
--- a/raveos-calamares-theme/PKGBUILD
+++ b/raveos-calamares-theme/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: nippy <nippy@tuta.io>
pkgname=raveos-calamares-theme
pkgver=2.0.0
-pkgrel=53
+pkgrel=54
pkgdesc="RaveOS Calamares Theme"
arch=('any')
url="https://git.rp1.hu/RaveOS"
@@ -24,4 +24,7 @@ package() {
install -Dm755 "${startdir}/etc/calamares/modules/calamares-gpu-drivers.sh" \
"${pkgdir}/etc/calamares/modules/calamares-gpu-drivers.sh"
+
+ install -Dm755 "${startdir}/etc/calamares/modules/raveos-chown-homes.sh" \
+ "${pkgdir}/etc/calamares/modules/raveos-chown-homes.sh"
}
diff --git a/raveos-calamares-theme/etc/calamares/modules/raveos-chown-homes.sh b/raveos-calamares-theme/etc/calamares/modules/raveos-chown-homes.sh
new file mode 100755
index 0000000..acabd6c
--- /dev/null
+++ b/raveos-calamares-theme/etc/calamares/modules/raveos-chown-homes.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+# RaveOS: célrendszer /home könyvtárainak rekurzív chown-ja a céluserhez.
+# A Calamares shellprocess-final (dontChroot: true) hívja, $1 = ${ROOT}.
+set -euo pipefail
+
+ROOT="${1:-}"
+[ -n "$ROOT" ] || { echo "raveos-chown-homes: ROOT hiányzik"; exit 1; }
+
+PASSWD="$ROOT/etc/passwd"
+[ -f "$PASSWD" ] || { echo "raveos-chown-homes: $PASSWD hiányzik"; exit 0; }
+
+while IFS=: read -r user _ uid gid _ _ home _; do
+ [ -n "$user" ] || continue
+ case "$uid" in
+ ''|*[!0-9]*) continue ;;
+ esac
+ [ "$uid" -ge 1000 ] && [ "$uid" -lt 60000 ] || continue
+ case "$gid" in
+ ''|*[!0-9]*) gid="$uid" ;;
+ esac
+ if [ -z "$home" ] || [ "$home" = "/" ]; then
+ home="/home/$user"
+ fi
+ [ -d "$ROOT$home" ] || continue
+ chown -R "$uid:$gid" "$ROOT$home" 2>/dev/null || true
+ echo "raveos-chown-homes: $home -> $uid:$gid"
+done < "$PASSWD"
+
+exit 0
diff --git a/raveos-calamares-theme/etc/calamares/modules/shellprocess-final.conf b/raveos-calamares-theme/etc/calamares/modules/shellprocess-final.conf
index c1892aa..ab65751 100644
--- a/raveos-calamares-theme/etc/calamares/modules/shellprocess-final.conf
+++ b/raveos-calamares-theme/etc/calamares/modules/shellprocess-final.conf
@@ -23,7 +23,7 @@ script:
- "if [ -x ${ROOT}/usr/lib/raveos-cosmic-theme/auto-apply.sh ]; then arch-chroot ${ROOT} /usr/lib/raveos-cosmic-theme/auto-apply.sh; fi"
- "if [ -x ${ROOT}/usr/lib/raveos-plasma-theme/auto-apply.sh ]; then arch-chroot ${ROOT} /usr/lib/raveos-plasma-theme/auto-apply.sh; fi"
- "if [ -x ${ROOT}/usr/lib/raveos-hyprland-theme/auto-apply.sh ]; then arch-chroot ${ROOT} /usr/lib/raveos-hyprland-theme/auto-apply.sh; fi"
- - "arch-chroot ${ROOT} /bin/bash -c 'for u in $(awk -F: \"\\$3>=1000 && \\$3<60000 {print \\$1}\" /etc/passwd); do chown -R \"$u:$u\" \"/home/$u\" 2>/dev/null || true; done'"
+ - "bash /etc/calamares/modules/raveos-chown-homes.sh ${ROOT}"
- "arch-chroot ${ROOT} /bin/bash -c 'pacman -Qi plasma-bigscreen &>/dev/null && pacman -Rcns --noconfirm plasma-bigscreen || true'"
- "arch-chroot ${ROOT} sed -i '/^HOOKS=/ s/udev /udev plymouth /' /etc/mkinitcpio.conf"
- "arch-chroot ${ROOT} mkinitcpio -P"