| # 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 "Factory shim hacked pre-start" |
| # author "chromium-os-dev@googlegroups.com" |
| # |
| # /tmp and /run are mounted as tmpfs by upstart, but we want to preserve |
| # them after switch_root. Hack this upstart job to unmount /tmp and /run. |
| |
| start on startup |
| task |
| |
| script |
| umount /tmp || true |
| umount /run || true |
| # Apply the tmpfiles.d configurations for /dev, /proc, and /run. |
| systemd-tmpfiles --create --remove --boot \ |
| --prefix /dev \ |
| --prefix /proc \ |
| --prefix /run 2>/run/tmpfiles.log |
| end script |