2 Commits
2.3 ... 2.3.2

Author SHA1 Message Date
1f78e5fa1c dinit: handle user spawn in chroot 2025-08-15 16:55:18 +02:00
e5e819e337 dinit: add user spawn install & remove hooks 2025-08-15 16:16:02 +02:00
3 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
[Trigger]
Type = Path
Operation = Install
# Operation = Upgrade
Target = usr/lib/dinit.d/dinit-user-spawn
[Action]
Description = Enabling dinit user spawn ...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/dinit-hook userspawnE
NeedsTargets

View File

@@ -0,0 +1,10 @@
[Trigger]
Type = Path
Operation = Remove
Target = usr/lib/dinit.d/dinit-user-spawn
[Action]
Description = Disabling dinit user service help ...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/dinit-hook userspawnD
NeedsTargets

View File

@@ -66,6 +66,20 @@ case $op in
del) svc_del_help ;;
addU) svc_user_add_help ;;
delU) svc_user_del_help ;;
userspawnE)
if dinit_live; then
/usr/bin/dinitctl enable dinit-user-spawn
else
/usr/bin/dinitctl enable -o dinit-user-spawn
fi
;;
userspawnD)
if dinit_live; then
/usr/bin/dinitctl disable dinit-user-spawn
else
/usr/bin/dinitctl disable -o dinit-user-spawn
fi
;;
*) echo >&2 " Invalid operation '$op'"; exit 1 ;;
esac