| # Copyright 2017 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 "cleanup of flash component updater" |
| author "chromium-os-dev@chromium.org" |
| |
| start on stopped ui |
| task |
| |
| script |
| flash="/run/imageloader/PepperFlashPlayer" |
| if [ -d "${flash}" ]; then |
| dm="$(grep "${flash}" /proc/self/mountinfo | cut -d ' ' -f 9)" |
| loop="/dev/loop$(dmsetup table "${dm}" | cut -d ' ' -f 5 | cut -d ':' -f 2)" |
| umount "${flash}" |
| rm -rf "${flash}" |
| dmsetup wipe_table "${dm}" |
| dmsetup remove "${dm}" |
| losetup -d "${loop}" |
| fi |
| end script |