Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 description "Trigger udev events" | 5 description "Trigger udev events" |
| 6 author "chromium-os-dev@chromium.org" | 6 author "chromium-os-dev@chromium.org" |
| 7 | 7 |
| 8 # We must run eventually even if the UI doesn't come up correctly, | 8 # We must run eventually even if the UI doesn't come up correctly, |
| 9 # because network configuration depends on this job. | 9 # because network configuration depends on this job. |
| 10 start on starting failsafe | 10 start on starting failsafe |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 | 26 |
| 27 if [ -n "$drv" ] ; then | 27 if [ -n "$drv" ] ; then |
| 28 drvmod=$(lsmod | awk 'd==$1 { print $1 }' d="$drv") | 28 drvmod=$(lsmod | awk 'd==$1 { print $1 }' d="$drv") |
| 29 fi | 29 fi |
| 30 | 30 |
| 31 if [ -n "$drvmod" ] ; then | 31 if [ -n "$drvmod" ] ; then |
| 32 if [ -s $drvfile ] ; then | 32 if [ -s $drvfile ] ; then |
| 33 olddrv=$(head -1 $drvfile) | 33 olddrv=$(head -1 $drvfile) |
| 34 fi | 34 fi |
| 35 | 35 |
| 36 # Blacklist brcm drivers | |
|
jrbarnette
2011/04/06 22:20:51
Can you add a TODO here? I want to make sure it's
kliegs
2011/04/06 22:30:12
Done.
| |
| 37 if [ "$(echo $drv | head -c4)" = "brcm" ] ; then | |
| 38 [ -s $drvfile ] && rm $drvfile | |
|
jrbarnette
2011/04/06 22:20:51
Ugh. I'm not fond of this idiom. This will work
kliegs
2011/04/06 22:30:12
Done.
| |
| 36 # Only update contents if they've changed. | 39 # Only update contents if they've changed. |
| 37 if [ "$drv" != "$olddrv" ] ; then | 40 elif [ "$drv" != "$olddrv" ] ; then |
| 38 echo "$drv" > $drvfile | 41 echo "$drv" > $drvfile |
| 39 fi | 42 fi |
| 40 else | 43 else |
| 41 logger "udev-addon:$iwdev: $drv is not a module." | 44 logger "udev-addon:$iwdev: $drv is not a module." |
| 42 fi | 45 fi |
| 43 end script | 46 end script |
| OLD | NEW |