Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| toshiba_satellite_u500-17d [Le 31/08/2022, 23:30] – Passage de http à https sur les liens externes (détecté et corrigé via le bot wiki-corrector (https://forum.ubuntu-fr.org/viewtopic.php?id=2067892) moths-art | toshiba_satellite_u500-17d [Le 08/10/2022, 17:06] (Version actuelle) – [Ventilateur] deprecated egrep - trouvé avec wiki-corrector + amélioration du script Amiralgaby | ||
|---|---|---|---|
| Ligne 50: | Ligne 50: | ||
| <file bash> | <file bash> | ||
| #!/bin/sh | #!/bin/sh | ||
| + | |||
| ### BEGIN INIT INFO | ### BEGIN INIT INFO | ||
| # Provides: | # Provides: | ||
| Ligne 58: | Ligne 58: | ||
| # Default-Stop: | # Default-Stop: | ||
| # Short-Description: | # Short-Description: | ||
| - | # Description: | + | # Description: |
| ### END INIT INFO | ### END INIT INFO | ||
| + | |||
| . / | . / | ||
| + | |||
| [ -f / | [ -f / | ||
| PATH=/ | PATH=/ | ||
| + | |||
| COOLING_DEVICES_DIR="/ | COOLING_DEVICES_DIR="/ | ||
| - | SERVICE_NAME=" | + | SERVICE_NAME=" |
| + | |||
| case " | case " | ||
| start) | start) | ||
| log_begin_msg " | log_begin_msg " | ||
| + | |||
| for x in $(find $COOLING_DEVICES_DIR | grep cur_state) | for x in $(find $COOLING_DEVICES_DIR | grep cur_state) | ||
| do | do | ||
| - | device_dir=" | + | device_dir=" |
| - | num_device=" | + | num_device=" |
| - | max_state=" | + | max_state=" |
| new_state=" | new_state=" | ||
| - | if [ $num_device -gt 4 ] | + | if [ "$num_device" |
| then | then | ||
| new_state=$max_state | new_state=$max_state | ||
| fi | fi | ||
| - | | + | |
| done | done | ||
| + | |||
| log_end_msg 0 | log_end_msg 0 | ||
| ;; | ;; | ||
| Ligne 99: | Ligne 99: | ||
| exit 1 | exit 1 | ||
| esac | esac | ||
| + | |||
| exit 0 | exit 0 | ||
| </ | </ | ||
| Ligne 137: | Ligne 137: | ||
| ===== Voir aussi ===== | ===== Voir aussi ===== | ||
| - | * (en) [[https:// | + | * (en) [[https:// |
| * (fr) [[http:// | * (fr) [[http:// | ||
| * (fr) [[: | * (fr) [[: | ||
