Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(845)

Unified Diff: syslog.conf

Issue 6720036: Slight cleanup of syslog.conf. (Closed) Base URL: ssh://gitrw.chromium.org:9222/init.git@master
Patch Set: Use install; no hacky chown -R. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syslog.conf
diff --git a/syslog.conf b/syslog.conf
index 0d9b65a796456c7e97f61ec48241e337d3cc3080..3a38c61c4322813843865777bef865814812c86a 100644
--- a/syslog.conf
+++ b/syslog.conf
@@ -10,14 +10,16 @@ start on runlevel 2
stop on starting halt or starting reboot
pre-start script
+ SYSLOG_RUN="/var/run/rsyslog"
+ KMSG_PIPE="${SYSLOG_RUN}/kmsg"
-SYSLOG_RUN="/var/run/rsyslog"
-KMSG_PIPE="${SYSLOG_RUN}/kmsg"
-
-mkdir -p "$SYSLOG_RUN"
-test -p "$KMSG_PIPE" || mkfifo -m 600 "$KMSG_PIPE"
-chown -R syslog:syslog "$SYSLOG_RUN"
-
+ if [ ! -d "${SYSLOG_RUN}" ]; then
+ install --owner=syslog --group=syslog -d "${SYSLOG_RUN}"
+ fi
+ if [ ! -p "${KMSG_PIPE}" ]; then
+ mkfifo -m 600 "${KMSG_PIPE}"
+ chown syslog:syslog "${KMSG_PIPE}"
+ fi
end script
respawn
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698