blob: 819599605195ba9ff9eace4bcd5302a5ce7ea07a [file] [edit]
# Copyright 2023 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Setup compressed memory swap"
author "ctshao@google.com"
start on started swap_management
task
# It is exceedingly unlikely to OOM, as it's a simple dbus-send call,
# but better to kill it than to panic the system.
oom score -100
# `--print-reply` is used for `dbus-send` to log the return status of
# SwapStart.
exec minijail0 -u chronos -g chronos \
-- /usr/bin/dbus-send --fixed --print-reply --system \
--dest=org.chromium.SwapManagement \
/org/chromium/SwapManagement org.chromium.SwapManagement.SwapStart