| OLD | NEW |
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 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 "Start powerm after dbus has started" | 5 description "Start powerm after dbus has started" |
| 6 author "chromium-os-dev@chromium.org" | 6 author "chromium-os-dev@chromium.org" |
| 7 | 7 |
| 8 start on started dbus | 8 start on started dbus |
| 9 stop on starting halt or starting reboot | 9 stop on starting halt or starting reboot |
| 10 | 10 |
| 11 env LOG_DIR=/var/log/power_manager | 11 env LOG_DIR=/var/log/power_manager |
| 12 env RUN_DIR=/var/run/power_manager | 12 env RUN_DIR=/var/run/power_manager |
| 13 env PREFS_DIR=/var/lib/power_manager |
| 13 | 14 |
| 14 respawn | 15 respawn |
| 15 respawn limit 20 60 # if the job respawns 20 times in 60 seconds, stop trying. | 16 respawn limit 20 60 # if the job respawns 20 times in 60 seconds, stop trying. |
| 16 | 17 |
| 17 script | 18 script |
| 18 | 19 |
| 19 mkdir -p ${LOG_DIR} ${RUN_DIR} | 20 mkdir -p ${LOG_DIR} ${RUN_DIR} |
| 20 # powerd will create files here as well | 21 # powerd will create files here as well |
| 21 chmod a+w ${RUN_DIR} | 22 chmod a+w ${RUN_DIR} |
| 22 exec /usr/bin/powerm \ | 23 exec /usr/bin/powerm \ |
| 24 --prefs_dir=${PREFS_DIR} \ |
| 23 --log_dir=${LOG_DIR} \ | 25 --log_dir=${LOG_DIR} \ |
| 24 --run_dir=${RUN_DIR} \ | 26 --run_dir=${RUN_DIR} \ |
| 25 > ${LOG_DIR}/powerm.out 2>&1 | 27 > ${LOG_DIR}/powerm.out 2>&1 |
| 26 | 28 |
| 27 end script | 29 end script |
| OLD | NEW |