


















@@ -12,63 +12,9 @@ export OPENCLAW_DISABLE_BUNDLED_PLUGINS=1
1212# Stub systemd/loginctl so doctor + daemon flows work in Docker.
1313export PATH="/tmp/openclaw-bin:$PATH"
1414mkdir -p /tmp/openclaw-bin
15-16-cat >/tmp/openclaw-bin/systemctl <<"SYSTEMCTL"
17-#!/usr/bin/env bash
18-set -euo pipefail
19-20-args=("$@")
21-if [[ "${args[0]:-}" == "--user" ]]; then
22-args=("${args[@]:1}")
23-fi
24-cmd="${args[0]:-}"
25-case "$cmd" in
26-status)
27- exit 0
28- ;;
29-is-active)
30- echo "inactive" >&2
31- exit 3
32- ;;
33-is-enabled)
34- unit="${args[1]:-}"
35- unit_path="$HOME/.config/systemd/user/${unit}"
36- if [ -f "$unit_path" ]; then
37- echo "enabled"
38- exit 0
39- fi
40- echo "disabled" >&2
41- exit 1
42- ;;
43-show)
44- echo "ActiveState=inactive"
45- echo "SubState=dead"
46- echo "MainPID=0"
47- echo "ExecMainStatus=0"
48- echo "ExecMainCode=0"
49- exit 0
50- ;;
51-*)
52- exit 0
53- ;;
54-esac
55-SYSTEMCTL
56-chmod +x /tmp/openclaw-bin/systemctl
57-58-cat >/tmp/openclaw-bin/loginctl <<"LOGINCTL"
59-#!/usr/bin/env bash
60-set -euo pipefail
61-62-if [[ "$*" == *"show-user"* ]]; then
63-echo "Linger=yes"
64-exit 0
65-fi
66-if [[ "$*" == *"enable-linger"* ]]; then
67-exit 0
68-fi
69-exit 0
70-LOGINCTL
71-chmod +x /tmp/openclaw-bin/loginctl
15+cp scripts/e2e/lib/doctor-install-switch/shims/systemctl /tmp/openclaw-bin/systemctl
16+cp scripts/e2e/lib/doctor-install-switch/shims/loginctl /tmp/openclaw-bin/loginctl
17+chmod +x /tmp/openclaw-bin/systemctl /tmp/openclaw-bin/loginctl
72187319package_tgz="${OPENCLAW_CURRENT_PACKAGE_TGZ:?missing OPENCLAW_CURRENT_PACKAGE_TGZ}"
7420git_root="/tmp/openclaw-git"
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。