| # 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. |
| |
| description "Perform CUPS session cleanup tasks." |
| author "chromium-os-dev@chromium.org" |
| |
| start on login-prompt-visible |
| task |
| |
| script |
| # Remove the stamp file to force clearing privileged directories. |
| rm -f /run/cups/.stamp |
| |
| # In case cupsd is running, stop it. |
| # This avoids race. After "stop cupsd" just below, it is ensured that |
| # cups-clear-state.sh is executed before next cupsd in 1) just below or |
| # 2) in cupsd's pre-start. In either case, the privileged directories |
| # should be removed, so that it cupsd will start from scratch state. |
| stop cupsd || : |
| |
| exec /usr/share/cros/init/cups-clear-state.sh |
| end script |