0

[crd host][mac] Explicitly enable broker service before bootstrapping

It seems if the user has explicitly disabled the broker service with
`sudo launchctl disable system/org.chromium.chromoting.broker`, then the
bootstrap command will fail. Our code never tries to disable it, but
explicitly enabling it could make the installer more robust.

Bug: 411490453
Change-Id: Ie2bc8970b5d686c0d1bc541a844b75e5f678ef21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6517192
Auto-Submit: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1456646}
This commit is contained in:
Yuwei Huang
2025-05-06 15:31:29 -07:00
committed by Chromium LUCI CQ
parent d725a06eeb
commit 7fad45c3b1

@ -22,6 +22,7 @@ NATIVE_MESSAGING_HOST_BUNDLE_NAME=@@NATIVE_MESSAGING_HOST_BUNDLE_NAME@@
REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=@@REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@@
HOST_EXE="$HELPERTOOLS/$HOST_BUNDLE_NAME/Contents/MacOS/remoting_me2me_host"
USERS_TMP_FILE="$HOST_SERVICE_BINARY.users"
BROKER_SERVICE_TARGET="system/org.chromium.chromoting.broker"
# ksadmin moved from MacOS to Helpers in Keystone 1.2.13.112, 2019-11-12. A
# symbolic link from the old location was left in place, but may not remain
@ -138,6 +139,8 @@ ln -s "$HELPERTOOLS/$HOST_BUNDLE_NAME/Contents/Resources/icudtl.dat" \
# started until a host process connects to
# chromoting.agent_process_broker_mojo_ipc.
logger Loading broker service
logger launchctl enable $BROKER_SERVICE_TARGET
launchctl enable $BROKER_SERVICE_TARGET
logger launchctl bootstrap system $BROKER_PLIST
launchctl bootstrap system $BROKER_PLIST