container hooks: make nspawn work inside nspawn

https://bugs.archlinux.org/task/55082 :
> This is probably caused by the fact that `systemd-nspawn` now registers
> a scope when `--register=no` is specified, unless `--keep-unit` is also
> specified [1].
[1] https://github.com/systemd/systemd/pull/6166
This commit is contained in:
Marcel Partap 2024-02-23 22:10:24 +01:00
parent 0845468303
commit 518534d352
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ then
case "${HOOK}" in case "${HOOK}" in
*.container) *.container)
umount chroot/proc umount chroot/proc
systemd-nspawn --capability=all -D chroot "/root/$(basename ${HOOK})" || { Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;} systemd-nspawn --capability=all --register=no --keep-unit -D chroot "/root/$(basename ${HOOK})" || { Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
mount proc-live -t proc chroot/proc mount proc-live -t proc chroot/proc
;; ;;
*) *)