| # 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 "Abstract job to control the /run/chromeos-config mount" |
| author "The Chromium OS Authors <chromium-os-dev@chromium.org>" |
| |
| start on starting boot-services |
| |
| env CROS_CONFIGFS_IMAGE="/usr/share/chromeos-config/configfs.img" |
| env MOUNTPOINT="/run/chromeos-config" |
| |
| pre-start script |
| mkdir -p "${MOUNTPOINT}" |
| if [ -e "${CROS_CONFIGFS_IMAGE}" ]; then |
| # This is a unibuild board. |
| cros_configfs mount "${CROS_CONFIGFS_IMAGE}" "${MOUNTPOINT}" |
| else |
| # This is a non-unibuild board. |
| cros_configfs mount-fallback "${MOUNTPOINT}" |
| fi |
| end script |
| |
| post-stop exec cros_configfs unmount "${MOUNTPOINT}" |