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

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

Issue 992007: Add settings to used modified module-device-restore to set initial volume. (Closed)
Patch Set: Fixed bugs. 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') | no next file » | 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
index 77b342f8039de6fe7af5af82e415c40d0281a291..dd993a2b829a5a768494ac940df7d1e92c3da6a7 100644
--- a/src/platform/init/pulseaudio.conf
+++ b/src/platform/init/pulseaudio.conf
@@ -15,34 +15,20 @@ 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}"
+end script
+
+expect fork
+exec /sbin/minijail ${MINIJAIL_FLAGS} --uid=${USER_ID} -- \
+ /usr/bin/pulseaudio --log-target=syslog --start
- 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
+# Clean up our run directory
+post-stop script
+ rm -rf "${PULSE_RUNTIME_PATH}"
end script
« no previous file with comments | « src/platform/audioconfig/pulse/firstrun.pa ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698