blob: bc565ffe3714118d0007760ef49c60be302390ee [file] [log] [blame]
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Start qc-netmgr server"
author "chromium-os-dev@chromium.org"
start on qrtr-service-added
stop on qrtr-service-removed
# This service keeps the modem data connection alive. It can be killed,
# at the cost of an interruption in LTE connectivity.
oom score -100
respawn
expect fork
# As per QC, we need to restart modemmanager everytime we start qc-netmgr.
pre-start script
restart_modemmanager() {
initctl restart modemmanager || true
}
restart_modemmanager
end script
# mmdata_mgr needs CAP_NET_ADMIN to open AF_QIPCRTR socket.
# TODO(evgreen): Put back proper sandboxing:
# -S /usr/share/policy/qc-netmgr-seccomp.policy \
exec minijail0 --profile=minimalistic-mountns -inNlpvr --uts \
-c cap_net_admin=e -u nobody -g nobody \
-- /usr/bin/mmdata_mgr