aboutsummaryrefslogtreecommitdiff
path: root/files/sound
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-01-29 17:37:33 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-01-29 17:37:33 -0200
commitfa0cceb62d710f36e4f6a36786db1a5a2e8cd2de (patch)
treed058775b412307c9c3979e172a641402aa3b8e0d /files/sound
parentb669231b3bac4bfa8081b75d774752c155c5d493 (diff)
downloadpuppet-nodo-fa0cceb62d710f36e4f6a36786db1a5a2e8cd2de.tar.gz
puppet-nodo-fa0cceb62d710f36e4f6a36786db1a5a2e8cd2de.tar.bz2
Adding sound suport on node::vserver::instance
Diffstat (limited to 'files/sound')
-rw-r--r--files/sound/devices.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/files/sound/devices.sh b/files/sound/devices.sh
new file mode 100644
index 0000000..405ed7a
--- /dev/null
+++ b/files/sound/devices.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+VSERVER="$1"
+
+if [ -z "$VSERVER" ]; then
+ ROOT="/"
+else
+ ROOT="/var/vservers/$1"
+fi
+
+if [ "$2" == "--check" ]; then
+ if [ -e "$ROOT/dev/snd/controlC0" ]; then
+ exit 0
+ else
+ exit 1
+ fi
+fi
+
+mkdir $ROOT/dev/snd
+mknod $ROOT/dev/snd/controlC0 c 116 0
+mknod $ROOT/dev/snd/pcmC0D0c c 116 24
+mknod $ROOT/dev/snd/pcmC0D0p c 116 16
+mknod $ROOT/dev/snd/timer c 116 33
+
+if [ -z "$VSERVER" ]; then
+ chown -R root:audio /dev/snd
+else
+ vserver $VSERVER exec chown -R root:audio /dev/snd
+fi
+
+chmod 660 $ROOT/dev/snd/*