| # Copyright 2018 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 "Monitor wifi status after pci rescan (Cyan devices only)" |
| author "chromium-os-dev@chromium.org" |
| |
| start on pci-rescan-to-revive-wifi |
| task |
| |
| env DEVICEPATH |
| import DEVICEPATH |
| |
| pre-start script |
| case "${DEVICEPATH}" in |
| /devices/pci*) |
| if [ ! -e "/sys/"$(dirname "${DEVICEPATH}")"" ]; then |
| logger -t pci-rescan "Can't revive non-existent root-port ${DEVICEPATH}" |
| stop |
| exit 1 |
| fi |
| ;; |
| *) |
| logger -t pci-rescan "Can't revive device ${DEVICEPATH}" |
| stop |
| exit 1 |
| ;; |
| esac |
| end script |
| |
| exec /usr/sbin/pci-rescan-to-revive-wifi.sh "${DEVICEPATH}" |