tanin-greet: install greetd config via .install scriptlet (avoid file conflict)
greetd owns /etc/greetd/config.toml, so ship our config to /usr/share/tanin/greetd/ and activate it from a post_install/post_upgrade scriptlet (with a one-time backup). Fixes the pacman file conflict. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# Activate the tanin-greet greetd config. greetd owns /etc/greetd/config.toml,
|
||||
# so we can't package that path — install it from the shipped template here,
|
||||
# backing up any existing (e.g. distro default / regreet) config once.
|
||||
_activate() {
|
||||
local src=/usr/share/tanin/greetd/config.toml
|
||||
local dst=/etc/greetd/config.toml
|
||||
[ -f "$src" ] || return 0
|
||||
if [ -e "$dst" ] && ! grep -q 'tanin-greet' "$dst" 2>/dev/null && [ ! -e "$dst.tanin-bak" ]; then
|
||||
cp -a "$dst" "$dst.tanin-bak"
|
||||
fi
|
||||
install -Dm644 "$src" "$dst"
|
||||
}
|
||||
|
||||
post_install() {
|
||||
_activate
|
||||
cat <<'EOF'
|
||||
>> tanin-greet: greetd now launches the TANINUX greeter (backup: /etc/greetd/config.toml.tanin-bak)
|
||||
Enable the login screen with: systemctl enable greetd (disable any other DM first)
|
||||
EOF
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
_activate
|
||||
}
|
||||
Reference in New Issue
Block a user