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 | 5 |
6 description "Syslog daemon" | 6 description "Syslog daemon" |
7 author "chromium-os-dev@chromium.org" | 7 author "chromium-os-dev@chromium.org" |
8 | 8 |
9 start on runlevel 2 | 9 start on starting boot-services |
10 stop on starting halt or starting reboot | 10 stop on starting halt or starting reboot |
11 | 11 |
12 pre-start script | 12 pre-start script |
13 SYSLOG_RUN="/var/run/rsyslog" | 13 SYSLOG_RUN="/var/run/rsyslog" |
14 KMSG_PIPE="${SYSLOG_RUN}/kmsg" | 14 KMSG_PIPE="${SYSLOG_RUN}/kmsg" |
15 | 15 |
16 if [ ! -d "${SYSLOG_RUN}" ]; then | 16 if [ ! -d "${SYSLOG_RUN}" ]; then |
17 install --owner=syslog --group=syslog -d "${SYSLOG_RUN}" | 17 install --owner=syslog --group=syslog -d "${SYSLOG_RUN}" |
18 fi | 18 fi |
19 if [ ! -p "${KMSG_PIPE}" ]; then | 19 if [ ! -p "${KMSG_PIPE}" ]; then |
20 mkfifo -m 600 "${KMSG_PIPE}" | 20 mkfifo -m 600 "${KMSG_PIPE}" |
21 chown syslog:syslog "${KMSG_PIPE}" | 21 chown syslog:syslog "${KMSG_PIPE}" |
22 fi | 22 fi |
23 end script | 23 end script |
24 | 24 |
25 respawn | 25 respawn |
26 expect fork | 26 expect fork |
27 exec rsyslogd -c4 -f /etc/rsyslog.chromeos | 27 exec rsyslogd -c4 -f /etc/rsyslog.chromeos |
OLD | NEW |