summaryrefslogtreecommitdiffstats
path: root/extra/pulseaudio/NuTyX_config.patch
blob: 585b0e6e867e99f626cb96f7154b262ae7688adf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
--- a/src/daemon/esdcompat.in
+++ b/src/daemon/esdcompat.in
@@ -24,7 +24,19 @@ fail() {
     exit 1
 }
 
-ARGS=" --log-target=syslog"
+# Modifications de NuTyX
+CONFIG=/etc/sysconfig/sound
+
+PULSE_ARGS=" --log-target=syslog"
+[ -r "$CONFIG" ] && . $CONFIG
+
+if [ "$ENABLE_PULSEAUDIO" != "yes" ]; then
+  echo "PulseAudio étant désactivé dans la configuration, il ne sera pas lancé." >&2
+  exit
+fi
+
+ARGS=" $PULSE_ARGS"
+# Fin des modifications
 
 while [ "$#" -gt "0" ]; do
 
@@ -74,10 +86,10 @@ EOF
             shift
             ARGS="$ARGS '-Lmodule-esound-compat-spawnfd fd=$1'"
             ;;
-        
-        -unix|-b|-public|-terminate|-nobeeps|-trust|-tcp|-promiscuous)  
+
+        -unix|-b|-public|-terminate|-nobeeps|-trust|-tcp|-promiscuous)
             # Ignore these commands
-            ;; 
+            ;;
 
         -d|-r|-as|-port|-bind)
             # Ignore these commands and their arguments
--- a/src/daemon/start-pulseaudio-x11.in
+++ b/src/daemon/start-pulseaudio-x11.in
@@ -19,7 +19,19 @@
 
 set -e
 
-@PA_BINARY@ --start "$@"
+# Modifications NuTyX
+CONFIG=/etc/sysconfig/sound
+
+PULSE_ARGS=" --log-target=syslog"
+[ -r "$CONFIG" ] && . $CONFIG
+
+if [ "$ENABLE_PULSEAUDIO" != "yes" ]; then
+  echo "PulseAudio étant désactivé dans la configuration, il ne sera pas lancé." >&2
+else
+
+@PA_BINARY@ --start ${PULSE_ARGS} "$@"
+
+# Fin des modifications
 
 if [ x"$DISPLAY" != x ] ; then
 
@@ -30,3 +42,5 @@ if [ x"$DISPLAY" != x ] ; then
 	@PACTL_BINARY@ load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null
     fi
 fi
+
+fi
--- a/src/daemon/start-pulseaudio-kde.in
+++ b/src/daemon/start-pulseaudio-kde.in
@@ -21,10 +21,24 @@ set -e
 
 [ -z "$PULSE_SERVER" ]
 
-@PA_BINARY@ --start "$@"
+# Modifications NuTyX
+CONFIG=/etc/sysconfig/sound
+
+PULSE_ARGS=" --log-target=syslog"
+[ -r "$CONFIG" ] && . $CONFIG
+
+if [ "$ENABLE_PULSEAUDIO" != "yes" ]; then
+  echo "PulseAudio étant désactivé dans la configuration, il ne sera pas lancé." >&2
+else
+
+@PA_BINARY@ --start ${PULSE_ARGS} "$@"
+
+# Fin des modifications
 
 if [ x"$DISPLAY" != x ] ; then
 
     @PACTL_BINARY@ load-module module-device-manager "do_routing=1" > /dev/null
 
 fi
+
+fi