Re: [Tails-dev] Small patch to mute sound on boot time

Delete this message

Reply to this message
Autor: CAN Consulting
Data:  
A: tails-dev
Assumpte: Re: [Tails-dev] Small patch to mute sound on boot time
> Unless there are very good reasons not to, I'd prefer this to happen
> using a regular initscript rather than in live-config. Regular
> initscripts e.g. can be run in parallel in Debian Squeeze. Yeah, I do
> know most of the Tails boot-time stuff is still done in live-config;
> we probably could migrate most of it, but in the meantime, let's at
> least avoid adding more stuff there when possible.


Ok. The new file is attached. I hope it's better :)
Do you need someone to move some of the /lib/live/config scripts
to init.d (and change them accordingly)?


Bye!


--JohnDoe
>From ec30069df45a93a9ecb73565beada1e14cc2d8bd Mon Sep 17 00:00:00 2001
From: use <user@localhost>
Date: Thu, 26 May 2011 17:23:19 +0200
Subject: [PATCH] Added a small init.d script that mutes audio at startup.
This prevents startup sounds and accidentially played audio
files to arouse suspicion unless the user unmutes the audio
himself.

---
 .../etc/init.d/tails-audio-mute                    |   36 ++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100755 config/chroot_local-includes/etc/init.d/tails-audio-mute


diff --git a/config/chroot_local-includes/etc/init.d/tails-audio-mute b/config/chroot_local-includes/etc/init.d/tails-audio-mute
new file mode 100755
index 0000000..0c40bb9
--- /dev/null
+++ b/config/chroot_local-includes/etc/init.d/tails-audio-mute
@@ -0,0 +1,36 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          tails-audio-mute
+# Required-Start:    mountkernfs $local_fs
+# Required-Stop:     $local_fs
+# Default-Start:     S
+# Default-Stop:      
+# Short-Description: Mute Audio
+# Description:       Mute audio Master channel on startup
+### END INIT INFO
+
+# Author: amnesia <amnesia@???>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/bin
+NAME=tails-audio-mute
+AMIX="/usr/bin/amixer"
+AMIX_PARM="-q sset Master mute"
+SCRIPTNAME=/etc/init.d/$NAME
+
+[ -x "$AMIX" ] || exit 0
+
+case "$1" in
+  start)
+    $AMIX $AMIX_PARM
+    ;;
+  restart|reload|stop|force-reload)
+    :
+    ;;
+  *)
+    echo "Usage: $SCRIPTNAME start" >&2
+    exit 3
+    ;;
+esac
+
+:
-- 
1.7.4.4