mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-22 11:14:58 +00:00
InvenTree: run apt under systemd so postinst can finish (#18029)
1.6.0's postinst walks parent PIDs until PID 1 to collect settings. Under pct exec the chain ends at PID 0, and since InvenTree #12995 turned the loop's [ ] into [[ ]] it no longer breaks out there, so the install hung printing ps and strings errors. systemd-run makes systemd the parent.
This commit is contained in:
1 parent
1e0fd45962
commit
b1e92ba2b7
2 files changed
+7
-3
No files matched your search
+3
-1
@@ -58,7 +58,9 @@ function update_script() {
|
||||
|
||||
msg_info "Updating InvenTree"
|
||||
apt_update_safe
|
||||
$STD apt install --only-upgrade inventree -y
|
||||
# postinst loops forever unless its parent chain reaches PID 1 (not the case under pct exec)
|
||||
$STD systemd-run --wait --pipe --quiet --collect --setenv=DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install --only-upgrade -y inventree
|
||||
msg_ok "Updated InvenTree"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
|
||||
@@ -23,8 +23,10 @@ setup_deb822_repo \
|
||||
msg_ok "Set up InvenTree Repository"
|
||||
|
||||
msg_info "Installing InvenTree (Patience)"
|
||||
export SETUP_NO_CALLS=true
|
||||
$STD apt install -y inventree
|
||||
# The package's postinst walks parent PIDs until it reaches PID 1; under pct exec the chain ends at 0
|
||||
# and since 1.6.0 that loops forever, so apt runs as a child of systemd
|
||||
$STD systemd-run --wait --pipe --quiet --collect --setenv=SETUP_NO_CALLS=true --setenv=DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y inventree
|
||||
msg_ok "Installed InvenTree"
|
||||
|
||||
msg_info "Configuring InvenTree"
|
||||
|
||||
Reference in new issue
Block a user