| # Copyright 2016 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. |
| |
| # This job handles delayed copying of the mount-encrypted log file into |
| # /var/log. Since mount-encrypted forks a filesystem resizing process |
| # into the background, give it a chance to at least start running before |
| # copying the log. Waiting until after system-services seems sufficient, |
| # and additionally does not add any delay to chromeos_startup itself. |
| [Unit] |
| Description=Chrome OS post-mount-encrypted cleanup |
| After=system-services.target |
| |
| [Service] |
| Type=oneshot |
| RemainAfterExit=true |
| |
| # Copy the log (not through symlinks), and retain permissions but use |
| # the default SELinux label for the target. The target should always |
| # be removed since we don't want to follow symlinks on the target. |
| # Use a trailing slash to require that "log" is a directory. |
| ExecStart=-/bin/cp -aPZ --remove-destination \ |
| /run/mount_encrypted/mount-encrypted.log /var/log/ |