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

Unified Diff: src/platform/init/pulseaudio.conf

Issue 672002: Reapply 97758de2adf4eb8c861b66826e890e5c3479e071. (Closed)
Patch Set: Created 10 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 | « src/platform/audioconfig/pulse/firstrun.pa ('k') | src/platform/init/windowmanager.conf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/init/pulseaudio.conf
diff --git a/src/platform/init/pulseaudio.conf b/src/platform/init/pulseaudio.conf
new file mode 100644
index 0000000000000000000000000000000000000000..77b342f8039de6fe7af5af82e415c40d0281a291
--- /dev/null
+++ b/src/platform/init/pulseaudio.conf
@@ -0,0 +1,48 @@
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+description "Run pulseaudio when the system starts"
+author "chromium-os-dev@googlegroups.com"
+
+start on started syslog
+stop on starting halt
+respawn
+
+env USERNAME=chronos
+env XAUTHORITY=/home/chronos/.Xauthority
+env DISPLAY=:0.0
+# TODO(ajwong): pulseaudio wants CAP_NICE. Readd --use-capabilities after
+# resolving that dependency.
+env MINIJAIL_FLAGS=""
+env PULSEAUDIO_FIRST_RUN=/tmp/pulseaudio-first-run
+env PULSE_STATE_PATH=/home/chronos/.pulse
+env PULSE_RUNTIME_PATH=/var/run/pulse
+env USER_ID=1000
+
+pre-start script
+ # Signal whether or not we need to do initial configuration of pulseaudio.
+ if [ -d ${PULSE_STATE_PATH} ]; then
+ rm -f "${PULSEAUDIO_FIRST_RUN}"
+ else
+ # Try to clean out any bad cruft at this directory, just incase.
+ rm -rf "${PULSE_STATE_PATH}"
+ touch "${PULSEAUDIO_FIRST_RUN}"
+ fi
+end script
+
+script
+ # Create pulseaudio runtime directory for pulseaudio's pidfile and socket.
+ mkdir -p "${PULSE_RUNTIME_PATH}"
+ chown -R chronos:chronos "${PULSE_RUNTIME_PATH}"
+
+ if [ -f "${PULSEAUDIO_FIRST_RUN}" ] ; then
+ # Clean up the first-run signal file.
+ rm -f "${PULSEAUDIO_FIRST_RUN}"
+ exec /sbin/minijail ${MINIJAIL_FLAGS} --uid=${USER_ID} -- \
+ /usr/bin/pulseaudio -F /etc/pulse/firstrun.pa
+ else
+ exec /sbin/minijail ${MINIJAIL_FLAGS} --uid=${USER_ID} -- \
+ /usr/bin/pulseaudio
+ fi
+end script
« no previous file with comments | « src/platform/audioconfig/pulse/firstrun.pa ('k') | src/platform/init/windowmanager.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698